File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Inter-servlet communication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Inter-servlet communication" Watch "Inter-servlet communication" New topic
Author

Inter-servlet communication

Gareth Western
Ranch Hand

Joined: Apr 07, 2004
Posts: 45
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

Joined: Apr 01, 2004
Posts: 10
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Inter-servlet communication
 
Similar Threads
ServletContext within ServletConfig
someone pls explain me this statement...
Servlet Context and Servlet
Getting reference to a Servlet Context of a Servlet that's on a different server?
What is the name of the object that is created/maintained by the Servlet Container and contains all