You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by mraible <ma...@raibledesigns.com> on 2007/02/27 21:55:48 UTC

Re: [S2] Is it possible to get Struts' FilterDispatcher to serve up static files

Right, it can serve up static content from the classpath, but I want to do it
from the webapp.

Matt


Musachy Barroso wrote:
> 
> Quoting the doc: "
> 
> Common static content that is needed by the framework (JavaScript and CSS
> files, etc.) is served automatically by the FilterDispatcher filter. Any
> request starting with "/struts/" denotes that static content is required,
> and then mapping the value after "/struts/" to common packages in Struts 2
> and, optionally in the application's class path.
> 
> By default, the following packages are searched:
> 
>    - org.apache.struts2.static
>    - template
> 
> Additional packages can be specified by providing a comma separated list
> to
> the configuration parameter named "packages" (configured in web.xml for
> the
> FilterDispatcher filter). When specifying additional static content, you
> should be careful not to expose sensitive configuration information (i.e.
> database password)."
> //I haven't used it myself :)
> musachy
> 
> On 2/27/07, mraible <ma...@raibledesigns.com> wrote:
>>
>>
>> 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.
>>
>> I noticed that FilterDispatcher allows you to serve up static files from
>> the
>> classpath.  Is it possible to configure this same filter so it can serve
>> up
>> static .html files from a "static" directory in my webapp root?
>>
>> Thanks,
>>
>> Matt
>> --
>> View this message in context:
>> http://www.nabble.com/Is-it-possible-to-get-Struts%27-FilterDispatcher-to-serve-up-static-files-tf3304172.html#a9191128
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> 
> -- 
> "Hey you! Would you help me to carry the stone?" Pink Floyd
> 
> 

-- 
View this message in context: http://www.nabble.com/Is-it-possible-to-get-Struts%27-FilterDispatcher-to-serve-up-static-files-tf3304172.html#a9191703
Sent from the Struts - User mailing list archive at Nabble.com.


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