Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Request parameter

 
Meyer Florian
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic