Michael McGrady wrote:

> I am having a hard time seeing what you want to do, but I know that
> your issues with the "junkbean" are unrelated to the "hiding" of the
> JSPs behind/beneath/be-whatever WEB-INF.  If you want to access data,
> including an object, then the data must be saved somewhere and then
> accessed where it is saved during the time it is saved.  That is the
> simple truth that is required for this situation.

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]

Reply via email to