Harjots way should work (and you return null from the Action) but there is another more popular way which is to create an ActionForward instance in your action and return it:
ActionForward fwd = new ActionForward("/FetchNextPage.jsp",true); return fwd; (where the boolean specifies whether its a redirecting forward or not). -----Original Message----- From: Harjot Narula [mailto:[EMAIL PROTECTED] Sent: Wednesday, 9 June 2004 20:04 To: Struts Users Mailing List Subject: Re: Action Forward Hi Brati Well, as far as I can understand, you don't wanna use struts-config for your forward path cause it is being generated at runtime. I think this will be helpful Just before returning from execute of the Action class, you can redirect the control to any JSP. response.sendRedirect(response.encodeRedirectURL("/FetchNextPage.jsp")); Try this and let me know Hope this helps Harjot ----- Original Message ----- From: [EMAIL PROTECTED] To: Struts Users Mailing List Cc: [EMAIL PROTECTED] Sent: Tuesday, June 08, 2004 7:59 PM Subject: RE: Action Forward Thanks Shilpa and Frank, I know about the part of adding it to struts-config.xml. but the case is I am receiving the path of a screen at runtime. so I cannot put it in struts-config.xml. Brati Sankar Ghosh Tata Consultancy Services Mailto: [EMAIL PROTECTED] Website: http://www.tcs.com "Frank Zammetti" <[EMAIL PROTECTED]> 06/08/2004 06:57 PM Please respond to "Struts Users Mailing List" <[EMAIL PROTECTED]> To [EMAIL PROTECTED] cc Subject RE: Action Forward Cool, I didn't know that. Ignore my solutions Brati! (I suggested manually doing a forward via RequestDispatcher and returning null from the Action... I believe that would work as well, but certainly this is much better). Frank >From: "Robert Taylor" <[EMAIL PROTECTED]> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]> >Subject: RE: Action Forward >Date: Tue, 8 Jun 2004 08:28:14 -0400 > >Yes. > >return new ActionForward(path); > >robert > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 08, 2004 7:17 AM > To: Struts Users Mailing List > Cc: Struts Users Mailing List > Subject: Action Forward > > > > Is it possible to forward to a page(html/jsp) from the Action Class >without declaring that forward in the struts-config.xml? > > Brati Sankar Ghosh > Tata Consultancy Services > Mailto: [EMAIL PROTECTED] > Website: http://www.tcs.com _________________________________________________________________ Watch the online reality show Mixed Messages with a friend and enter to win a trip to NY http://www.msnmessenger-download.click-url.com/go/onm00200497ave/direct/01/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ForwardSourceID:NT0000B1FA ---------------------------------------------------------------------------- -- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]