You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Faraz Ali <fa...@gmail.com> on 2008/12/01 09:08:01 UTC

DOJO in struts2

Hi All,

Whenever i used any of the struts2 UI tag (with theme="ajax"), nothing is
rendered on the browser. And when i looked into the view source, there is
lot of javascript code which is referring DOJO. How to add DOJO support in
struts2? What need to download? If i need to download DOJO toolkit, than
which version? how i will integrate it with my application?


-- 
Best Regards,
Faraz Ali

Re: DOJO in struts2

Posted by Faraz Ali <fa...@gmail.com>.
Yes its working now.
Thank you very much.

On Tue, Dec 2, 2008 at 4:11 PM, Lukasz Lenart
<lu...@googlemail.com>wrote:

> 2008/12/2 Faraz Ali <fa...@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
>
>


-- 
Best Regards,
Faraz Ali

Re: DOJO in struts2

Posted by Lukasz Lenart <lu...@googlemail.com>.
2008/12/2 Faraz Ali <fa...@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


Re: DOJO in struts2

Posted by Faraz Ali <fa...@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>

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>



On Tue, Dec 2, 2008 at 12:24 AM, Lukasz Lenart <lukasz.lenart@googlemail.com
> wrote:

> 2008/12/1 Faraz Ali <fa...@gmail.com>:
> > yes, i added this.
>
> Struts 2 version?
> How did you map filter?
>
>
> 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
>
>


-- 
Best Regards,
Faraz Ali

Re: DOJO in struts2

Posted by Lukasz Lenart <lu...@googlemail.com>.
2008/12/1 Faraz Ali <fa...@gmail.com>:
> yes, i added this.

Struts 2 version?
How did you map filter?


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


Re: DOJO in struts2

Posted by Faraz Ali <fa...@gmail.com>.
yes, i added this.

On Mon, Dec 1, 2008 at 7:23 PM, Lukasz Lenart
<lu...@googlemail.com>wrote:

> 2008/12/1 Faraz Ali <fa...@gmail.com>:
>  > Whenever i used any of the struts2 UI tag (with theme="ajax"), nothing
> is
> > rendered on the browser. And when i looked into the view source, there is
> > lot of javascript code which is referring DOJO. How to add DOJO support
> in
> > struts2? What need to download? If i need to download DOJO toolkit, than
> > which version? how i will integrate it with my application?
>
> Struts2 version?
> Did you add <s:head theme="ajax"/> tag?
>
>
> 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
>
>


-- 
Best Regards,
Faraz Ali

Re: DOJO in struts2

Posted by Lukasz Lenart <lu...@googlemail.com>.
2008/12/1 Faraz Ali <fa...@gmail.com>:
> Whenever i used any of the struts2 UI tag (with theme="ajax"), nothing is
> rendered on the browser. And when i looked into the view source, there is
> lot of javascript code which is referring DOJO. How to add DOJO support in
> struts2? What need to download? If i need to download DOJO toolkit, than
> which version? how i will integrate it with my application?

Struts2 version?
Did you add <s:head theme="ajax"/> tag?


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