You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Lukasz Lenart (Jira)" <ji...@apache.org> on 2022/09/14 18:56:00 UTC
[jira] [Closed] (WW-1451) struts.action.extension=html
[ https://issues.apache.org/jira/browse/WW-1451?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukasz Lenart closed WW-1451.
-----------------------------
Resolution: Won't Fix
> struts.action.extension=html
> ----------------------------
>
> Key: WW-1451
> URL: https://issues.apache.org/jira/browse/WW-1451
> Project: Struts 2
> Issue Type: Improvement
> Components: Plugin - Dojo Tags
> Reporter: Mike McMahon
> Priority: Minor
> Fix For: 6.1.0
>
>
> 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 was sent by Atlassian Jira
(v8.20.10#820010)