Hi Guys,

We are moving forward with our plans to migrate from Struts6/Tomcat9 to Struts7/Tomcat11 but we've hit a few snags I was hoping someone else has experienced and hopefully solved.

The first and biggest issue is with Tomcat 11. The app runs as expected but no pages are rendered and by that I mean nothing at all. Our logs don't show any errors - we are using log4j2 with DEBUG as the ROOT level default. The strange thing is when we run the same app on Tomcat 10.1.45 it works as expected, except for one possibly related issue.

We are using struts 7.0.3 with Tomcat 11.0.10 and Sitemesh 3.2.2 as our decorator, we also tried Sitemesh 3.2.1 which made no difference.

Web.xml is configured as below:

<filter-mapping>
        <filter-name>struts-prepare</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

    <filter-mapping>
        <filter-name>sitemesh</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

    <filter-mapping>
        <filter-name>struts-execute</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

This is the critical issue as we want to identify the cause of the issue and resolve rather than put it off.


The second issue is related to sitemesh, which the first issue may also be. When we run the app on Tomcat 10 struts actions aren't identified in the path attribute only the resulting jsp is. Let me explain, say we have a test action configured in my struts.xml as such:

<action name="testAction" class="testActionClass" method="test">
     <result>/WEB-INF/pages/testPage.jsp</result>
</action>

If I configure sitemesh like this:

<mapping decorator="mainDecorator.jsp"/>
<mapping path="*/testAction.action" decorator="testDecorator.jsp"/>

The result is incorrectly decorated using the default mainDecorator, this works correctly in our struts 6 setup which is more or less identical, but if I change it to this:

<mapping decorator="mainDecorator.jsp"/>
<mapping path="*/testPage.jsp" decorator="testDecorator.jsp"/>

The page is decorated correctly. As you can imagine that's not what we want. Mapping to the actions is a far more elegant and manageable.

The documentation for sitemesh is a bit thin on their site so any assistance would be appreciated.

Zoran


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to