File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Showing Server side Variables on JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Showing Server side Variables on JSP" Watch "Showing Server side Variables on JSP" New topic

Showing Server side Variables on JSP

Fawad Ali
Ranch Hand

Joined: Dec 28, 2009
Posts: 112
Hello All,
I am new to Struts. I need to know how can the server variables be shown on a JSP page. For Example I have a list in an action class and I want to iterate it on a JSP page using Struts' <logic:iterate>. Then in action class's execute method I ll have to put the list in session. Is there any other method like in Spring we put everything into a HashMap and it is available to JSP page. Does anyone know of the session alternative. An Example will be better.

Regards, Fawad Ali.
Software Engineer, Stafona Inc. - My Blog
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902

To make that "list" accessible on JSP page, you have to put that "list" in any one of the scope.

[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
I agree. Here's the link:
subject: Showing Server side Variables on JSP