This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 Android Security Essentials Live Lessons this week in the Android 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
 
 
subject: displaying request var using struts on jsp
 
Similar Threads
Doubts about bean:write
New to Struts - Mappings/Forwards problem
Struts Page Expired
how to retain, entered values
Writing an alert into a HttpServletResponse object