This seems like a good idea. Please open a jira ticket for it:
http://issues.apache.org/struts
Don
Mike McMahon wrote:
It seems that some folks (such as AppFuse) like to set
struts.action.extension=html
Thats fine and dandy except that it makes it 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
a 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);
} 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;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]