[
http://www.stripesframework.org/jira/browse/STS-715?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ben Gunter closed STS-715.
--------------------------
> DynamicMappingFilter fails with FileNotFoundException when <jsp:include> is
> used to include an action
> -----------------------------------------------------------------------------------------------------
>
> Key: STS-715
> URL: http://www.stripesframework.org/jira/browse/STS-715
> Project: Stripes
> Issue Type: Bug
> Components: ActionBean Dispatching
> Affects Versions: Release 1.5.1
> Environment: Probably the bug is platform independent, but it might
> be Glassfish-specific, I don't have resources to test it in other app servers
> Reporter: Grzegorz Krugły
> Assignee: Frederic Daoud
> Fix For: Release 1.5.2, Release 1.6
>
>
> Using code like
> <s:url var="url" beanclass="package.MyAction" prependContext="false"/>
> <jsp:include page="${url}"/>
> when DynamicMappingFilter is used instead of ServletDispatcher, results in
> FileNotFoundException being thrown.
> It is because ErrorTrappingResponseWrapper, as documented in line 343 comment
> "// Wrap the response in a wrapper that catches errors (but not exceptions)",
> does NOT catch any exceptions. When jsp:include is used to include an action
> URL instead a JSP file, the include request goes down to the default servlet
> which doesn't return SC_NOT_FOUND error code but throws a
> FileNotFoundException.
> I have worked around the issue by changing
> chain.doFilter(request, wrapper);
> in DynamicMappingFilter.doFilter() method to
> try {
> chain.doFilter(request, wrapper);
> } catch (FileNotFoundException fnfex) {
> fnfthrown = true;
> }
> and manually overriding wrapper's errorCode to SC_NOT_FOUND in case the above
> exception is caught. I do not post entire patch because it's ugly and am
> hoping someone more knowledgeable with Stripes will be able to fix it better.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development