Thanks Antonio Petrelli,

But I can't define a forward, since the forward url
and id are not static. URL can be any page and id can
be any number. Is there a way to do it without
forwards.

Chamal.

--- Antonio Petrelli <[EMAIL PROTECTED]> wrote:

> 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]
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

Reply via email to