Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-2483

ServletActionContext not initialised in tiles plugin?

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 2.0.11
    • Fix Version/s: None
    • Component/s: Plugin - Tiles
    • Labels:
      None
    • Environment:

      struts 2.0.11 w/ tiles plugin, tiles-2.0.6-SNAPSHOT (same problem with 2.0.4 and 2.0.5), java 1.6.0_03, tomcat 6.0.16 and servlet api 2.5.

      Description

      I have a struts action which returns a tile as a result. This tile has an attribute which points to another tile, which uses another action as template:

      <definition name="layout" template="layout.jsp" >
      <put-attribute name="menu" value="menu" />
      </definition>

      <definition name="menu" template="/menu.action" />

      layout.jsp contains the line:

      <tiles:insertAttribute name="menu" />

      As soon as this line is there, ServletActionContext.getRequest() returns null in my taglib which is called from layout.jsp after that line. Without that line, it works fine.

      I posted this issue to the tiles user list and was finally asked to file an issue here. You may want to read the full post here:

      http://mail-archives.apache.org/mod_mbox/tiles-users/200802.mbox/%3c47B17A6D.5060709@open.ch%3e

      Simple example which reproduces the problem: http://baldes.name/s2t2.tar.gz This is a packed eclipse wtp "dynamic web project" containing all needed libraries and files (~5mb) (that is, all but apache tomcat itself).

      Calling http://server/context/some.action yields the problem I described.

      This is the stacktrace I get: http://baldes.name/s2t2.stacktrace.txt

        Attachments

          Activity

            People

            • Assignee:
              mrdon Donald J. Brown
              Reporter:
              db Damien Bouchet

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment