File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes displaying request var using struts on 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 » Frameworks » Struts
Bookmark "displaying request var using struts on jsp" Watch "displaying request var using struts on jsp" New topic
Author

displaying request var using struts on jsp

Ronan Dowd
Ranch Hand

Joined: Jan 21, 2006
Posts: 84
Hi,

How (using struts tags) on a JSP do i print the value of a request variable (a simple string) stored in the previous action ?
bean:write seems to just be for objects that are stored rather that simple types ..

Action code:
request.setAttribute("name","Bill");

JSP code:
??

Thanks, Ronan


SCJP 1.4 | OCWCD JEE 5
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864

The scope="request" is optional, as it will search any scope. If you don't specify a property, Struts assumes that the object itself is either a String or has a toString() method it can call.


Merrill
Consultant, Sima Solutions
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: displaying request var using struts on jsp