Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Struts and the fly likes How to initialize a request parameter? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to initialize a request parameter?" Watch "How to initialize a request parameter?" New topic
Author

How to initialize a request parameter?

Dave Alvarado
Ranch Hand

Joined: Jul 02, 2008
Posts: 436
Hi,

Using Struts 1. I have this action in my struts-config.xml file ...

<action path="/hhFlow"
type="com.myco.regui.struts.accounts.AccountsAction"
scope="request"
name="REAccountLookUpBean"
validate="true"
input="/jsp/hhError.jsp">
</action>

Is it possible to set a default value for a request parameter if that request parameter is not passed to the action?

Thanks, - Dave
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
You cannot set a default value for a parameter that does not exist.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to initialize a request parameter?