struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Musachy Barroso (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (WW-3086) Serving static content, when extension is empty
Date Mon, 13 Apr 2009 18:35:06 GMT

     [ https://issues.apache.org/struts/browse/WW-3086?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Musachy Barroso resolved WW-3086.
---------------------------------

    Resolution: Duplicate

thanks for reporting. I am closing it as it duplicates WW-3017

> Serving static content, when extension is empty
> -----------------------------------------------
>
>                 Key: WW-3086
>                 URL: https://issues.apache.org/struts/browse/WW-3086
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.11.1
>         Environment: Tomcat 5.5
>            Reporter: Aravindan Ramkumar
>         Attachments: struts.xml, web.xml
>
>
> I don't want .action or .do on the end of the url's, so I set struts.action.extension=''
(empty string)
> Now this leaves me with a bit of a problem serving static content, since struts swallows
up all of my requests, and nothing gets through to the default servlet.  I opened up the code
for FilterDispatcher and DefaultActionMapper. The FilterDispatcher would serve static files,
if struts.constants.serve.static is true and the action mapper returns null. But the problem
is if the extension is set as an empty string, DefaultActionMapper returns the name of the
static file as the action name.  Struts cannot find a action with that name and forwards to
the default action (if present) or throws an exception.
> A quick and dirty way to fix this would be to patch the DefaultActionMapper or add a
"black list" of urls to be ignored by FilterDispatcher. 
> Please look at the discussion here
> http://www.nabble.com/Struts2-static-content-td19784601.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message