Doh!

I tried that with request.getParameter()

Duh - the difference is wonderfully obvious now!

Thanks

-----Original Message-----
From: Joe [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 4:10 PM
To: struts-user
Subject: Re: Passing a parameter into an action from the action mapping?


At 4:11 PM -0400 2002/06/18, [EMAIL PROTECTED] wrote:
>I thought I saw a solution for this somewhere but I cannot find it...

set the value of the "parameter" attribute, then use 
"mapping.getParameter()" in the action.

It's not a dumb idea at all -- it's the kind of reusability that 
Struts makes easy...

Joe



>I have the following set up...
>
><action-mappings>
><action path="/index" parameter="" unknown="true"
>forward="plantsec.mainmenu">
><forward name="success" path="plantsec.mainmenu" redirect="false" />
></action>
><action path="/todo" parameter="" forward="plantsec.todo" />
><action path="/createNew" parameter=""
>type="com.ebind.plantsec.create.actionCreateNew" name="formNewRequest"
>input="plantsec.create.new" scope="request">
><forward name="continue" path="plantsec.create.new" redirect="false" />
><forward name="success" path="plantsec.mainmenu" redirect="false" />
></action>
><action path="/search" parameter=""
>type="com.ebind.plantsec.search.actionSearch" />
><action path="/search1w" parameter=""
>type="com.ebind.plantsec.search.actionSearch" />
><action path="/search2w" parameter=""
>type="com.ebind.plantsec.search.actionSearch" />
><action path="/search4w" parameter=""
>type="com.ebind.plantsec.search.actionSearch" />
><action path="/searchAllFuture" parameter=""
>type="com.ebind.plantsec.search.actionSearch" />
><action path="/searchAllPast" parameter=""
>type="com.ebind.plantsec.search.actionSearch" />
></action-mappings>
>
>All of my calls to Search are the same, just with a different duration. 

>I was looking at dispatch, but these are all from links so I would need
>to do /search.do?dur=1week
>
>Is there a way in the action mapping to say when they go to 
/search1w.do
>it forwards them into the same action with some sort of parameter?
>
>Or is it just a dumb ass idea and should I just do the dispatch?
>
>
>
>
>
>
>
>--
>To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
<mailto:[EMAIL PROTECTED]>


-- 
--
* Joe Germuska    { [EMAIL PROTECTED] }
"It's pitiful, sometimes, if they've got it bad. Their eyes get 
glazed, they go white, their hands tremble.... As I watch them I 
often feel that a dope peddler is a gentleman compared with the man 
who sells records."
        --Sam Goody, 1956
tune in posse radio: <http://www.live365.com/stations/289268>

--
To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: 
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to