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

Ted Husted updated WW-1451:
---------------------------

                Flags:   (was: [Patch])
    Affects Version/s:     (was: Future)
        Fix Version/s:     (was: 2.1.1)
                       Future

Since it doesn't seem like the patch will work, I'm moving this back to 
"future", pending a deeper discussion of how ActionConfig works generally. 



> struts.action.extension=html
> ----------------------------
>
>                 Key: WW-1451
>                 URL: https://issues.apache.org/struts/browse/WW-1451
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Plugin - Dojo Tags
>            Reporter: Mike McMahon
>            Priority: Minor
>             Fix For: Future
>
>
> Some folks (such as AppFuse) like to set struts.action.extension=html
> Thats fine but that it becomes impossible to use Strut's Dojo widgets like
> struts/dojo/struts/widgets/BindButton.html  due to a "no Action mapped " 
> exception
> It would be pretty simple to modify FilterDispatcher.doFilter as below to 
> first look for an
> action mapping, and if none is found, then check to see if Struts would 
> otherwise serve
> an internal static resource.
>         if (mapping == null ||
>         (mapping.getMethod() == null && ("").equals(mapping.getNamespace()) 
> && mapping.getParams() == null && mapping.getResult() == null
>         && 
> "true".equals(Settings.get(StrutsConstants.STRUTS_SERVE_STATIC_CONTENT)))) {  
>   
>             // there is no action in this request, should we look for a 
> static resource?
>             String resourcePath = RequestUtils.getServletPath(request);
>             if ("".equals(resourcePath) && null != request.getPathInfo()) {
>                 resourcePath = request.getPathInfo();
>             }
>             if 
> ("true".equals(Settings.get(StrutsConstants.STRUTS_SERVE_STATIC_CONTENT))
>                     && resourcePath.startsWith("/struts")) {
>                 String name = resourcePath.substring("/struts".length());
>                 findStaticResource(name, response);
>                 return;
>             } else if (mapping == null){
>                 // this is a normal request, let it pass through
>                 chain.doFilter(request, response);
>             }
>             if (mapping == null)  // The framework did its job here
>             return;
>         }
>  

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

Reply via email to