aspose file tools*
The moose likes Servlets and the fly likes How to access data in another servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to access data in another servlet" Watch "How to access data in another servlet" New topic
Author

How to access data in another servlet

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi,
I have a servletA that reads a serialized object into memory.
It then displays a JSP page which shows the different field data of that object. These fields would be links to another servletB.
I don't want to read in the object twice, how would servletB get access to the object in memory in servletA?
Is there a way to do this without EJB?
Thanks.
SQ
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
I am assuming that it's an HttpServlet so I guess you could put the object in the <B>request</B> object with the setAttribute() method and forward to ServletB...


Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to access data in another servlet