Hi
Could you explain mein in little bit detail what u meant by this.Like in my ocntext
what would be the settings in config.xml and what do u mean by dynamic.jsp here .I am
sorry as I am pretty new to struts (1 week old) so might be asking a very basic
question from you .
Could you please explain me this in little bit more detail.
Thanks in Advance
Sidh
On Mon, 14 Jan 2002 Cengiz Kayay wrote :
> Thats easy if I understood yoour problem.
>
> return new ActionForward(mapping.findForward("success")
> .getPath() +
> "dynamic.jsp");
>
> -----Original Message-----
> From: Sidhartha Jain [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 14, 2002 5:49 PM
> To: Struts Users Mailing List
> Subject: Regarding URL
>
>
>
> Hi All,
> I am trying to subsitute a java servlet code into an
> Struts Action class
> code.Here we are to forward to next page depending upon
> the variable jspurl
> value.I dont know how to do that in struts because what
> i Know we do
> return(mapping.findforward("sucess")) which is
> specified in config.xml to
> which page to forward which is a fixed url.
> How can we code this to make a dynamic url.I need this
> becos everytime i
> might have a difft action or type.Becos I am generating
> Dynamic JSP.
> Anyone who could answer this will be of great help for
> me.
>
> String jspURL = "/" + action + type + ".jsp";
> File testFile = new File(getServletContext
> ().getRealPath(jspURL));
> if (!testFile.exists())
> {
> jspURL = "/" + action + "Object.jsp";
> }
> System.out.println(jspURL + " ****");
>
> RequestDispatcher reqDis = getServletContext
> ().getRequestDispatcher(jspURL);
> reqDis.forward(request, response);
>
>
> Thanks in advance
> Sidh
>
>
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
> ________________________________________________________-
> _
> Do You Yahoo!?
> Get your free @yahoo.com address at
> http://mail.yahoo.com
>
>
> --
> To unsubscribe, e-mail: <mailto:struts-user-unsubscrib-
> [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]>