Hi.
What's exactly a default
servlet context? How do I configure it?
This is a question from jdiscuss about this.
-----------
Assuming that the servlet container is distributed across multiple JVMs, which of the following statements are correct? (Select 2 correct options.)
1 - A separate instance of a non-default servlet context will be available on each of the JVMs.
2 - A separate instance of all servlet context will be avaible on each of the JVMs
3 - The default servlet context will be present only on one of the JVMs.
4 - There is only one instance of servlet contexts across all the JVMs.
5 - None of the above.
Option 1 and 3 are actually the specification of the behaviour of ServletContexts.
Default servlet context is provided to servlets that are not deployed as a part of some webapplication. They are considered to be a part of "default" webapplication.