Search code examples
javagoogle-app-enginesitemesh

Sitemesh 2.4 with GAE


I'm trying to use sitemesh2.4 for my GAE(struts 1.3, spring 2.5) based app. I found out a couple of tutorials to configure sitemesh. I did exactly the same.

web.xml

<filter>
        <filter-name>sitemesh</filter-name>
        <filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class>
    </filter>

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

decorators.xml

    <decorators defaultdir="/decorators/">
    <excludes>
        <pattern>/**.xml</pattern>
    </excludes>
    <decorator name="base" page="base.jsp">
        <pattern>/*</pattern>
    </decorator>
</decorators>

After this I have created a dir decorators and in that base.jsp as a decorator. But when I visit my visit localhost:8088/ the decorator is not applied. I'm using intellij idea and I attached the source of the sitemesh to debug. When I start the server then 'init' method of SitemeshFilter is called but when I visit a url then 'doFilter' method is not even called.

Need help on this. Thanks


Solution

  • I found the solution to the problem. Actually I'm also using urlrewriter filter. In my web.xml I had this filter above sitemesh and was the problem. I moved the sitemesh filter above and now it's working fine.