Your junkbean is lost once index.jsp is rendered on the browser. Thats 
the end of the request scope. If you want the "junkbean" to last 
for more than 1 page on the browser, I guess "session" scope is 
appropriate. You can always remove it from the session after u 
have used it in LoginAction.

hth
-Jayash

Andy Wrote:
Sure -- that's the only way it will work.  I'll try to put everything
in order here, as I am doing it:

1. IndexAction (mapped to /home.do) puts data into the bean:

        List users = service.viewAllPeople(birForm);
        request.setAttribute("junkbean", users);

    ...and then returns index.jsp:

        <forward name="continue" path="/WEB-INF/pages/index.jsp"/>

                


2. Within this index.jsp is a form, which is submitted to LoginAction.

3. When I submit the form to LoginAction and LoginAction is finished,
then I want to return the /home.do mapping, or display the index.jsp
screen again:

        <action
            path="/login"
            type="com.andyengle.actions.LogonAction"
            name="logonForm"
            scope="request"
            input="/WEB-INF/pages/index.jsp">
          <forward name="continue" path="/home.do"/>
        </action>

4. When I do this, I get the following error:

    Cannot find bean junkbean in any scope


> If you go to access it and it is not there, then you must be
> accessing in session scope and saving in request scope or something
> like that.

Ok, in IndexAction, I did put it in request scope, but that should work
because I only want it for this request, not necessarily for the entire
session.  But in this case, does IndexAction even have access to the
request scope, or does LoginAction only have access to that (i.e.
IndexAction can't put junkbean in request scope)?


> You need to ask: (1) did I save "junk bean"?

Yes.


> (2) If not, do so.  If so, then is the scope of the respository
> adequate for your purposes.

It seems that request scope should be adaquate in this case, since I
only need it for the current request.


> (3) Etc. Okay dokay?

Okay dokay -- thanks!  Let me know if that is a decent-enough
clarification of my earlier question.


Andy


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to