You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Bessette <be...@650dialup.com> on 2003/11/17 01:59:22 UTC

How to forward without redirect from action?

I have an action that does the following:

public ActionForward execute(
	ActionMapping mapping,
	ActionForm form,
	HttpServletRequest request,
	HttpServletResponse response)
	throws Exception {

	request.setAttribute( "testing", "This is a test" );

	return new ActionForward( mapping.getInput(), false );
}

And I have a jsp page that has the following:

<%= pageContext.findAttribute( "testing" ) %>

The problem is the jsp page always prints null and the url is never that of
the action, always that of the page.  This means the action is always
redirecting to the input page no matter what I set the redirect variable in
the ActionForward to be.  How do I forward to the input page without
redirecting?

Here's my action mapping:
<action-mappings>
	<action
		path="/home/feedback/Email"
		type="org.app.struts.action.EmailAction"
		name="feedback"
		validate="true"
		input="/home/feedback">
	</action>
</action-mappings>

If you have any ideas or need more info to help out, please let me know.

Thanks,
Eric


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org