This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi, I'm new on JSP and Servlet. One servlet generated an object and put it in ServletContext by : getServletContext().getAttribute("examples.myObject"); Now a JSP wants to access this object(reference) and get some internal data of this object. How do I implement this? Thanks for your kind help. Jimmy ------------------ Jimmy
Hi, If you use the servlet context to store state (data) in a servlet, you can use the "application" variable in JSP to access it, provided the servlet and the JSP are in the same Context, i.e. are on the same server running in the same webserver and same JVM. Another way of doing this would be to use the "session" attribute of the JSP page, if your data is valid for a client session. In Servlet: session.putValue("..", "..); In JSP: session.getValue("..."); Hope this helps. Ashwin.
Joined: Feb 05, 2001
Ashwin, Thanks a lot. I will try it. ------------------ Jimmy
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com