aspose file tools*
The moose likes Servlets and the fly likes how to get objects from an included Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to get objects from an included" Watch "how to get objects from an included" New topic
Author

how to get objects from an included

Donna Reschke
Greenhorn

Joined: Jun 20, 2001
Posts: 17
i have a jsp that needs objects wich are generated in a servlet.
i need to include this servlet in the jsp and need to be able to get objects from the
servlet.
how can this be done?
Bhupinder Dhillon
Ranch Hand

Joined: Oct 12, 2000
Posts: 124
You set the objects as attributes in the HttpServletRequest object and access them in the JSP.
//servlet code
request.setAttribute("objectName", new Object());
//jsp code
Object obj = request.getAttribute("objectName");
 
Consider Paul's rocket mass heater.
 
subject: how to get objects from an included