• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Inter-servlet communication

 
Gareth Western
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I've written a servlet which adds an object to a new attribute in the ServletContext. What are the conditions to be able to access that ServletContext from a different servlet?
Cheers!
Gareth
 
Abdul Narayan D'souza TP
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yo Gareth,
There is one context per "web application" per Java Virtual
Machine.Therefore whenever u call ServletConfig.getServletContext() from
any servlet in an application(context) u get the same object.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic