• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ServletContext in Distributed Env.

 
Poonam Agarwal
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello ranchers,
Please check the follwing :

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.

The given answer is 1, 3.

actualy I don't understand the question exactly.

1. what is default servletContext?? Is it means the context which container creates during servelt life cycle??

2. As I understand we get only one serveltContext per JVM provided by container regardless of default or not.

3. option 1 specify about non-default servlet contaxt. Is that means in a Distributed Env we have to provide non default context to other JVM. what is the to create it in this case then.


Thanks





 
sudheer kiran
Ranch Hand
Posts: 237
Firefox Browser MyEclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi it looks you are working hard on SCWCD,which book you are preparing,some books go deeper and cover unnecessary topics.

check out SCWCD objectives.
 
Poonam Agarwal
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello Christophe,

Please correct me if I am wrong



Thanks in advance budy
 
Poonam Agarwal
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
refering to spec servlet2.4

Servlets in a container that were not deployed as part of aWeb application are
implicitly part of a “default” Web application and have a default ServletContext.
In a distributed container, the default ServletContext is non-distributable and
must only exist in one JVM.


what are those servlets which not deployed as a part of web-application. I wonder if they are not part of a web-application, then how container can able to load them??


Thanks
Poonam

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic