*
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Showing Server side Variables on JSP" Watch "Showing Server side Variables on JSP" New topic
Author

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
    
    1

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]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Showing Server side Variables on JSP
 
Similar Threads
ArrayList and Ajax
Design issue; request/session-objects
Collections and Struts...
Struts + I18N
DynaValidatorForm not redisplaying scoped variables