[
https://issues.jboss.org/browse/JBSEAM-4146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12639698#comment-12639698
]
Tiago Peruzzo commented on JBSEAM-4146:
---------------------------------------
I had a problem very similar to this, only in my case gave an exception "Caused
by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1"
... because I have configured in pages.xml to give an error when redirect to
same page, but the class RedirectHandler trying to resolve the viewId by
servletPath not only takes into account the rewritten URL and gave this
exception because it took a value type "/manager" and tried to find a point and
put the suffix default page.
<exception log="true" log-level="debug" class="java.lang.Exception">
<redirect>
<message
severity="error">#{org.jboss.seam.handledException.message}</message>
</redirect>
</exception>
I did an analysis on the code of Seam and found that when an exception occurred
in the fall and he does not know ExceptionFilter resolve because the rewritten
URL is executed after the RewriteFilter ExceptionFilter, but RewriteFilter
should be run after it because he is in charge of making forward to the page so
it will always be the last.
I solved my problem by changing the web.xml, causing Seam Filter was also
performed for the dispatcher FORWARD making my ExceptionFilter second came
after the first RewriteFilter, so ExceptionFilter can solve my current URL and
redirect to the correct rewrite.
<filter-mapping>
<filter-name>Seam Filter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
I found one Issue (https://jira.jboss.org/jira/browse/JBSEAM-3883) like it was
given as a suggestion of the problem by putting a move on ExceptionFilter
RewritingResponse to learn to solve rewritten url, except that in this case he
know not redirect correctly and get the URL correctly through servletPath.
Sorry for my English is not very good.
> "no file extension in servlet path" exception whenever a servlet throws an
> exception
> ------------------------------------------------------------------------------------
>
> Key: JBSEAM-4146
> URL: https://issues.jboss.org/browse/JBSEAM-4146
> Project: Seam 2
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.1.1.GA
> Environment: Java 6, Tomcat 6
> Reporter: Matthew Lieder
> Assignee: Marek Novotny
> Labels: testcase
> Fix For: 2.3.0.BETA1
>
> Attachments: SeamTestcase1.zip
>
>
> Pretty easy to reproduce: call a servlet from a Seam webapp that throws an
> exception, which will result in a Tomcat HTTP 500 error page that ,instead of
> displaying the servlet's exception, displays a "no file extension in servlet
> path" exception.
> See the attached testcase.
> I have yet to find a good workaround; only way seems to be to hack Seam's
> codebase myself. The problem definitely seems to be in
> org.jboss.seam.mock.MockViewHandler.getActionURL(...), as indicated by
> JBSEAM-2921.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
seam-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/seam-issues