This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Portals and Portlets and the fly likes How to pass instance variable to the JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "How to pass instance variable to the JSP" Watch "How to pass instance variable to the JSP" New topic
Author

How to pass instance variable to the JSP

Zandis Murāns
Ranch Hand

Joined: Aug 18, 2009
Posts: 174

How can I access passed variable (for example, an instance of List) to the JSP?
Here's how I'm trying to accomplish this:


view.jsp:


So how comes request.getAttribute("List") is null at this point?
Philip Thamaravelil
Ranch Hand

Joined: Feb 09, 2006
Posts: 99
Move you request.setAttribute("List", aList); to the doView and it will work.
 
 
subject: How to pass instance variable to the JSP