My struts-config.xml contains:

    <form-beans>
      <form-bean      name="loginForm"
                      type="org.icsgiving.nms.servlet.LoginForm"/>
      <form-bean      name="locationForm"
                      type="org.icsgiving.nms.servlet.LocationForm"/>
      <form-bean      name="requestForm"
                      type="org.icsgiving.nms.servlet.RequestForm"/>
    </form-beans>

    <global-forwards>
       <forward   name="login"                path="/login.jsp"/>
       <forward   name="location"             path="/location.jsp"/>
       <forward   name="menu"                 path="/menu.jsp"/>
       <forward   name="request"              path="/request.jsp"/>
       <forward   name="done"                 path="/done.jsp"/>
    </global-forwards>

    <action-mappings>

      <action    path="/login"
                 type="org.icsgiving.nms.servlet.LoginAction"
                 name="loginForm"
                scope="session"
                input="/login.jsp">
        <forward name="failure"              path="/login.jsp"/>
        <forward name="success"              path="/location.jsp"/>
      </action>

      <action    path="/location"
                 type="org.icsgiving.nms.servlet.LocationAction"
                 name="locationForm"
                scope="session"
                input="/location.jsp">
        <forward name="failure"              path="/location.jsp"/>
        <forward name="success"              path="/menu.jsp"/>
      </action>

      <action    path="/request"
                 type="org.icsgiving.nms.servlet.RequestAction"
                 name="requestForm"
                scope="session"
                input="/request.jsp">
        <forward name="failure"              path="/request.jsp"/>
        <forward name="success"              path="/done.jsp"/>
      </action>

    </action-mappings>

So my page flow goes login.jsp -> location.jsp -> request.jsp. I expect
to find my loginForm in the session when I'm in my
RequestAction.perform() method. It's not there. Only the request form
bean is. If I do this:

        log.debug("session:");
        Enumeration attributes = session.getAttributeNames();
        while (attributes.hasMoreElements())
        {
            log.debug(attributes.nextElement());
        }

in each perform() method, all I see is this:

<for LoginAction.perform():>
[DEBUG] session:
[DEBUG] org.apache.struts.action.LOCALE
[DEBUG] loginForm
<for RequestAction.perform():>
[DEBUG] session:
[DEBUG] requestForm
[DEBUG] org.apache.struts.action.LOCALE

Is this the intended behavior or am I doing something wrong?

Eliot Stock



Reply via email to