You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by rob rowntree <ro...@mindspring.com> on 2004/08/26 04:54:29 UTC

Request obj. disappears after "Forward"

I want an Action to include a "forward" element that forwards an "Update"
action to a "Confirm Update" page.

I use the java code below to return a value that forwards to a jsp page ..

forward name="confirm" in the java code does a RequestDispatch.forward to
pages/conf2_subedit.jsp.

The problem is that the orignal request object is gone when the jsp page
above trys to reference it. There are no longer any Parm values in the
request.

The manual pages suggest that the original request object will be forwarded.
Im not seeing that.

Details below on Struts-config, java action class, and Jsp.

+++++++++ Struts-config "action" Element

        <action    path="/subscriptioncreate"
           type="com.borneo.sub.beans.SubscriptionSave"
          name="subscriptionForm"
          scope="request"
          validate="true"
          input="/menu_sub.jsp">
          <forward name="success"    path="/Updated.do"/>
          <forward name="subscription"    path="/subscription.jsp"/>
        <forward name="confirm"  redirect="false"
path="/pages/conf2_subedit.jsp"/>
        </action>

++++++++ java Code from Action class="..beans.SubscriptionSave"

...

return (mapping.findForward("confirm"));

+++++++++ Jsp code from pages/conf2_subedit.jsp

<table width="100%" cellpadding=0 cellspacing=0 border=0>
<tr><td>faq request:

</td></tr>
<tr>
<%
     for (Enumeration e =request.getParameterNames() ; e.hasMoreElements()
;) {

%>
<td><%=e.nextElement().toString()%></td>
<%
     }%>
</tr>


+++++++++  results from Html page out from JSP

faq request:

Confirm - Edit Subscriptions


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.742 / Virus Database: 495 - Release Date: 8/19/2004


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