wood burning stoves 2.0*
The moose likes Struts and the fly likes Request parameter 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 "Request parameter" Watch "Request parameter" New topic
Author

Request parameter

Meyer Florian
Ranch Hand

Joined: Oct 20, 2003
Posts: 62
Hi
I have these two tags:
<bean arameter name="street" id="mystreet" value="blabla" />
<html:text property="street_field" size="40" maxlength="40" value="<%= mystreet %>" />
When I call my Action like: MyActionName.do?street=hellostreet, the field will be filled with the value "hellostreet".
When I call my Action like: MyActionName.do, the field will be filled with the value "blabla" because I did not pass any parameter and then the default value will be used.
When I pass the parameter "street" ober a request holder, I can print it out with <bean:write name="street" scope="request" /> but the textfield is not filled.
Any help?
Thanks! Florian
David Yutzy
tumbleweed and gunslinger
Ranch Hand

Joined: Jun 29, 2001
Posts: 192
I understand what you are trying to do, but wouldn't this logic be more suited to the Form Bean or other business logic-based process rather than doing it directly in your JSP?
Your JSP should just read the value and display it, not try to manipulate it...
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Request parameter
 
Similar Threads
problem of passing parameter
Submit Form and Enter Key
How to nest tags?
Struts Validation
JSP