This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: displaying request var using struts on jsp
 
Similar Threads
New to Struts - Mappings/Forwards problem
Struts Page Expired
Doubts about bean:write
how to retain, entered values
Writing an alert into a HttpServletResponse object