You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by bj...@accenture.com on 2007/02/09 10:14:12 UTC

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.

RE: From html:form direct to JSP

Posted by Kandelwal Abhishek <Ab...@acs-hro.com>.
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@accenture.com
[mailto:bjorn.de.bakker@accenture.com] 
Sent: Friday, February 09, 2007 4:14 AM
To: user@struts.apache.org
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@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org