facebook

Struts Chaining Actions

  1. MyEclipse IDE
  2.  > 
  3. Comments
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #217358 Reply

    This is for you struts gurus.

    I have an action that forwards to another action. It seems that the request object is not being carried forward. I specifically set reqest attributes in the first action, and in the second action they do not exist.

    The end of the first action is a mapping.findForward()….that in the strust_config.xml calls another “action.do”.

    I verify that I am indeed entering the second action…but my “request.getAttributes()” are all null.

    Lee

    #217372 Reply

    Riyad Kalla
    Member

    Lee,
    To trouble shoot this, put it in your session and see if all the sudden its working, if it is, then I think you are at the mercy of struts processing… I wish this behavior was more clearly defined… the request scope should be cleared between requests, and in this case you only have 1 request:

    client -> request -> serverAction -> (nulled here!) serverAction -> reply

    That is trickie… maybe you can ask on the Struts mailing list, those guys seem to know a lot about Struts 😛

    #217561 Reply

    @leebase wrote:

    I have an action that forwards to another action. It seems that the request object is not being carried forward. I specifically set reqest attributes in the first action, and in the second action they do not exist.

    The end of the first action is a mapping.findForward()….that in the strust_config.xml calls another “action.do”.

    I verify that I am indeed entering the second action…but my “request.getAttributes()” are all null.

    Just thought I’d update the forum with the solution…which I got from the struts mailing list.

    On my forward I set “redirect=false” and that solved the problem.

    Lee

    #217562 Reply

    Riyad Kalla
    Member

    *slaps forehead*

    Sorry I missed that one.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Struts Chaining Actions

You must be logged in to post in the forum log in