Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Servlet Context

 
Ranch Hand
Posts: 782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 2166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
What a stench! Central nervous system shutting down. Save yourself tiny ad!
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic