aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Servlet Context Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Servlet Context" Watch "Servlet Context" New topic
Author

Servlet Context

Vikrama Sanjeeva
Ranch Hand

Joined: Sep 02, 2001
Posts: 756
Provided non distributable enviroment, is there one ServletContext for each webapp.Means if there are 3 webapp in a single web server then there will be 3 ServletContext objects are associated with each web appl.?
Bye.
Viki.


Count the flowers of your garden, NOT the leafs which falls away!
Prepare IBM Exam 340 by joining http://groups.yahoo.com/group/IBM340Exam/
Axel Janssen
Ranch Hand

Joined: Jan 08, 2001
Posts: 2164
One ServletContext - Object per WebApp.
AND: If you have the WebApp running on multiple maschines for loadbalancing/failover purposes:
One ServletContext Object per WebApp on every JVM.
If you have your webapp cool.war deployed on serverA, serverB, serverC there will be 3 ServletContext objects.
Jim Bertorelli
Ranch Hand

Joined: Nov 28, 2001
Posts: 136
Just to add: The servlet context for the default web-app is non-distributable. That means it exists on only one JVM and is not copied to other JVMs.
Vikrama Sanjeeva
Ranch Hand

Joined: Sep 02, 2001
Posts: 756
Want to add some..

If you have your webapp cool.war deployed on serverA, serverB, serverC there will be 3 ServletContext objects.

If you have your webapp cool.war deployed on serverA, serverB, serverC there will be 3 ServletContext objects one on serverA,second on serverB and third on serverC
Is it right?
Bye.
Viki.
Axel Janssen
Ranch Hand

Joined: Jan 08, 2001
Posts: 2164
Yes. As I said and Jim clarified. There is a long discussion about this topic:
http://www.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=18&t=000955
This multi-server stuff puts aditional complexities one is not that aware of if coding with tomcat on a pc. But I am sure that its an important part of j2ee.
[ February 27, 2002: Message edited by: Axel Janssen ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlet Context