You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Daniel Baldes (JIRA)" <ji...@apache.org> on 2008/02/12 14:55:41 UTC

[jira] Created: (WW-2483) ServletActionContext not initialised in tiles plugin?

ServletActionContext not initialised in tiles plugin?
-----------------------------------------------------

                 Key: WW-2483
                 URL: https://issues.apache.org/struts/browse/WW-2483
             Project: Struts 2
          Issue Type: Bug
          Components: Plugin - Tiles
    Affects Versions: 2.0.11
         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.
            Reporter: Daniel Baldes


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


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WW-2483) ServletActionContext not initialised in tiles plugin?

Posted by "Don Brown (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2483?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Don Brown resolved WW-2483.
---------------------------

    Resolution: Not A Problem
      Assignee: Don Brown

What is probably happening here is you need to configure the clean up filter to surround the jsp invocation.  See the Sitemesh plugin docs for more information: http://struts.apache.org/2.0.11.1/docs/sitemesh-plugin.html

> ServletActionContext not initialised in tiles plugin?
> -----------------------------------------------------
>
>                 Key: WW-2483
>                 URL: https://issues.apache.org/struts/browse/WW-2483
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Tiles
>    Affects Versions: 2.0.11
>         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.
>            Reporter: Daniel Baldes
>            Assignee: Don Brown
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.