• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Servlet Context

 
Ranch Hand
Posts: 765
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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: 765
  • Mark post as helpful
  • send pies
  • 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
  • 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 ]
 
No thanks. We have all the government we need. This tiny ad would like you to leave now:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic