chamal desilva ha scritto:
Hi,

Is it possible to forward to a url rather than
forwaring to a forward in struts.config file from a
action class.

For example we can do like this from servlets.

req.getRequestDispatcher("page.jsp?id=10").forward(req,resp);

Can we do the same with struts.

Sure, you can:
* define a forward inside your action mapping that points to an URL:
<forward name="success" path="page.jsp?id=10" />
* return a newly created ActionForward at the end of the "execute" method:
return new ActionForward("page.jsp?id=10");

Anyway, I think that your problem depends on the presence of the parameter. Why do you want to process that parameter in the JSP page? Isn't it better to process it into the action and putting something in request scope?

Ciao
Antonio

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

Reply via email to