struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuart Piltch <>
Subject Re: Is it possible to get Struts' FilterDispatcher to serve up static files
Date Tue, 27 Feb 2007 20:56:24 GMT
mraible <matt <at>> writes:
> I'm using *.html as my default extension, which causes a whole host of issues
> with Dojo.  Regardless, I want to fight through it and see if I can come up
> with a solution.

Hi Matt,

I'm not sure about your specific FilterDispatcher question, but we also use
*.html as a default extension. We ended up copying all the dojo html files that
we use into out own /WEB-INF/widgets directory and adding an extra
struts-dojo.xml file to our config:

        "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"

    <package name="dojo" namespace="/struts/dojo/src/widget/templates"
        <action name="*">
            <result type="plainhtml">/WEB-INF/widgets/{1}.html</result>
    <package name="dojoEditor2"
namespace="/struts/dojo/src/widget/templates/Editor2" extends="base">
        <action name="*">
            <result type="plainhtml">/WEB-INF/widgets/Editor2/{1}.html</result>
    <package name="dojoEditor2Dialog"
namespace="/struts/dojo/src/widget/templates/Editor2/Dialog" extends="base">
        <action name="*">

It seems convoluted, but it's working. The other dojo files (css, js, etc) are
working fine from within the struts jar.


 - stuart

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message