Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

RE: From html:form direct to JSP

Kandelwal Abhishek

2007-02-09

Replies:


Hi,

Set the action field of the <html:form ....> to say "/xyz.do"
And put the following action mapping in struts-config.xml :

<action-mappings>
<action path="/xyz"
       parameter="/NameOfTarget.jsp"
       type="org.apache.struts.actions.ForwardAction"/>
</action-mappings>

This will directly redirect to Target Jsp without going into any Custom
Action.

Hope it will work for u.


Thanks & Regards
Abhishek Khandelwal

-----Original Message-----
From: bjorn.de.bakker@(protected)
[mailto:bjorn.de.bakker@(protected)]
Sent: Friday, February 09, 2007 4:14 AM
To: user@(protected)
Subject: From html:form direct to JSP

Hi everybody,

New day, new problem :). I have a html:form in my page, with hidden
fields (don't ask why, long explanation). When you submit that form, an
action is triggered, which forwards the user to a page. The problem is,
the forward is the only thing that the action does (no additional
lookups or processes). Is there a way to forward the form directly to a
JSP page, instead of triggering an action?



This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information. If you have
received it in error, please notify the sender immediately and delete
the original. Any other use of the email by you is prohibited.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.