• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

servlet COntext

 
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
why is servlet context is different for different JVMs?
Iam not getting this concept...pls paard me..Iam new to servlets.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have no idea what you are asking. A servlet context exists for each web application, of which there can be many in one JVM. Where do multiple JVMs enter the picture? Can you point us to where you got this idea?
[ March 22, 2007: Message edited by: Ulf Dittmer ]
 
Ranch Hand
Posts: 572
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JVMs can be different when our application is distributed and deployed accross different machines.

In this case the servlet contexts will be different because J2EE containers doesn't synchronize the contexts but they offer Session Synchronization accross diffrent machines.
 
NDP Prasad
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I did't understand what is a servletContext, thats why i asked that stupid question? Thanks for your response.

I got something from this link http://www.oop-reserch.com/servlet_context.html
 
NDP Prasad
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

In this case the servlet contexts will be different because J2EE containers doesn't synchronize the contexts but they offer Session Synchronization accross diffrent machines




How do we communicate if our webapplications are distributed? I mean within the servlets?

I think for servletcontext, we can use Database to setAttribute..session also use the same concept to share accross jvms. Is there any other way?
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by NDP Prasad:
How do we communicate if our webapplications are distributed? I mean within the servlets?

I think for servletcontext, we can use Database to setAttribute..session also use the same concept to share accross jvms. Is there any other way?



The servlet doesn't need to do anything for distributed web apps, and in particular, no database is required. As long as everything that is stored in the session is serializable, session replication will be made to work by the servlet container automatically.
 
Yup, yup, yup. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic