struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukasz Lenart" <lukasz.len...@googlemail.com>
Subject Re: DOJO in struts2
Date Tue, 02 Dec 2008 08:11:17 GMT
2008/12/2 Faraz Ali <farazali.faraz@gmail.com>:
> My struts version is struts 2.0.11.2.
>
> Below is my decorators.xml file:
>
> <decorators defaultdir="/decorators">
>  <excludes>
> <pattern>/styles/*</pattern>
> <pattern>/scripts/*</pattern>
> <pattern>/images/*</pattern>
> </excludes>
> <decorator name="layout" page="layout.jsp">
> <pattern>/*</pattern>
> </decorator>
> </decorators>

You should add also this:

        <pattern>/*ajax=true*</pattern>
        <pattern>/scripts/dojo/*</pattern>
        <pattern>/struts/dojo/*</pattern>
        <pattern>/resources/*</pattern>


> And below is my web.xml:
>
> <filter>
> <filter-name>sitemesh</filter-name>
> <filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
>
> </filter>
> <filter>
> <filter-name>struts2</filter-name>
> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
> </filter>
> <filter-mapping>
> <filter-name>struts2</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
> <filter-mapping>
> <filter-name>sitemesh</filter-name>
> <url-pattern>/*</url-pattern>
> <!-- <dispatcher>FORWARD</dispatcher> -->
> </filter-mapping>


And add Struts cleanup before sitemesh

    <filter>
        <filter-name>struts-cleanup</filter-name>
        <filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class>
    </filter>


http://struts.apache.org/2.0.11.2/docs/sitemesh-plugin.html


Regards
-- 
Lukasz
http://www.lenart.org.pl/

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


Mime
View raw message