GeeCON Prague 2014*
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


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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: displaying request var using struts on jsp