[ 
http://www.stripesframework.org/jira/browse/STS-715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11764#action_11764
 ] 

Frederic Daoud commented on STS-715:
------------------------------------

Hmm. I'm not sure this is a bug. I think it is higher up, i.e. why is a 
FileNotFoundException being thrown in the first place? The sample code from
the Stripes book uses DynamicMappingFilter instead of ServletDispatcher along 
with <s:url> and <jsp:include> to include an action, just like you described, 
and it works fine.

Any chance you could try it out with Tomcat? I know you said "I don't have 
resources to test it in other app servers" but Tomcat is free :-) And if by 
resources you mean time, well, if you don't have time to help out with the 
issue that you filed, then who does? ;-)

> 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
>
> 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.
-
If you think it was sent incorrectly contact one of the administrators: 
http://www.stripesframework.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to