Hi all,
I m new in struts.
when i run the ActionForward function, it returns
return mapping.findforward("somthing");
then struts will search the struts-config.xml to find my forward path.
but if i want to add some parameter in the path,
such as when i return the mapping.findforward("sth");
it will redirect to the path with some parameter (such as "login.jsp?msg=fail")
how to define the msg and its valus in mapping?
thanks
Regards,
Kin
-
struts mapping problem (3 messages)
- Posted by: kin Yeung
- Posted on: July 05 2004 21:31 EDT
Threaded Messages (3)
- hi by Bruce Lee on July 05 2004 23:15 EDT
- append a query-string by RamPrasad Suswaram on July 06 2004 02:13 EDT
- append a query-string by kin Yeung on July 08 2004 03:33 EDT
-
hi[ Go to top ]
- Posted by: Bruce Lee
- Posted on: July 05 2004 23:15 EDT
- in response to kin Yeung
I think, you can press request.setAttribute("msg","fail");
you can get this paramete in login.jsp. -
append a query-string[ Go to top ]
- Posted by: RamPrasad Suswaram
- Posted on: July 06 2004 02:13 EDT
- in response to kin Yeung
Try appending a query-string in your struts-confin.xml, for action-mapping.
For example:
<forward name="success" path="/login.jsp?msg=fail"/> -
append a query-string[ Go to top ]
- Posted by: kin Yeung
- Posted on: July 08 2004 03:33 EDT
- in response to RamPrasad Suswaram
Try appending a query-string in your struts-confin.xml, for action-mapping.For example:<forward name="success" path="/login.jsp?msg=fail"/>
Thanks..
But what about adding the variable in the forward path
<forward name="success" path="/login.jsp?msg=fail?login_name=xx"/>