Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

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 ]
 
Well THAT's new! Comfort me, reliable tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic