开发者

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

开发者_StackOverflow中文版
<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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜