A result of type redirect and address any URL:

<result name="success" type="redirect">
 <param name="location">http://localhost:8080/myproject/myapplication</param>
 <param name="param1">value1</param>
 <param name="param2">value2</param>
</result>

Properties from your action can be passed as parameters in the URL using the ${propertyName} notation:

<result name="success" type="redirect">
 <param name="location">http://localhost:8080/myproject/myapplication</param>
 <param name="param1">${property1}</param>
 <param name="param2">${property2}</param>
</result>

where property1 and property2 have getters in your action. This will give you the result you seek for a fixed set of parameters.

- Jeromy Evans

soum wrote:
Hi,

I have a servlet which implements some logic based on some URL parameters
passed to it. I can invoke this servlet directly from my browser, by simply
supplying the parameters thru the URL.

http://localhost:8080/myproject/myapplication?param1=value1&param2=value2

However, I would like to set these parameters thru' the struts.xml ( using
<s:param>) and thereafter link this
servlet ( the servlet simply extends HttpServlet) to the struts action so
that it is invoked the same manner as above.

any clue on how I can do this. how can get the request parameter values in
the action class ? how to pass this to the servlet?
Should I simply call ServletActionContext.setRequest(name of the servlet
object).

Thanks for your help, I really appreciate any pointers!!



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

Reply via email to