struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukasz Lenart (JIRA)" <j...@apache.org>
Subject [jira] Updated: (WW-3381) Suport for decorating static content
Date Sun, 14 Mar 2010 13:31:27 GMT

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

Lukasz Lenart updated WW-3381:
------------------------------

    Fix Version/s: Future

> Suport for decorating static content
> ------------------------------------
>
>                 Key: WW-3381
>                 URL: https://issues.apache.org/jira/browse/WW-3381
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Plugin - SiteMesh
>    Affects Versions: 2.1.8
>            Reporter: Philipp Leusmann
>            Priority: Critical
>             Fix For: Future
>
>   Original Estimate: 8h
>  Remaining Estimate: 8h
>
> In my case this issue is occuring when trying to decorate static content with sitemesh,
but it generally is more an struts-core ActionMapper issue. 
> I was trying to decorate plain html files using the sitemesh-plugin.
> I expected it to work using the empty-string action mapper, and thus added a link to
/decorated_html/foo.html . The reslut was an error page since all the variables in the template
could not be resolved, due to a missing action.
> If org.apache.struts2.dispatcher.mapper.DefaultActionMapper.dropExtension(String, ActionMapping)
would not return null for any url containing a dot but no slash and no supported action-extension
after it, it would have worked.
> By looking at the tests, I found that the returned null was expected behaviour introduced
for WW-2163.
> I think to resolve this issue it would have been better to promote more sofisticated
filter mappings in the web.xml to avoid the empty action side effects described in a previous
comment.
> In my case it would be sufficient to use filter mappings
> <filter-mapping>
> <filter-name>struts2-prepare</filter-name>
> <url-pattern>*.action</url-pattern>
> </filter-mapping>
> <filter-mapping>
> <filter-name>struts2-prepare</filter-name>
> <url-pattern>decorated_html/*</url-pattern>
> </filter-mapping>
> <filter-mapping>
> <filter-name>sitemesh-struts</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
> <filter-mapping>
> <filter-name>struts2-execute</filter-name>
> <url-pattern>*.action</url-pattern>
> </filter-mapping>
> <filter-mapping>
> <filter-name>struts2-execute</filter-name>
> <url-pattern>/decorated_html/*</url-pattern>
> </filter-mapping>

-- 
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