[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-1776) Exception handling redirects to incorrect URL

Wolfgang Schwendt (JIRA) jira-events at lists.jboss.org
Thu Aug 9 05:59:01 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBSEAM-1776?page=comments#action_12371582 ] 
            
Wolfgang Schwendt commented on JBSEAM-1776:
-------------------------------------------

org.jboss.seam.mock.MockViewHandler.getActionURL of Rev 1.7 (http://fisheye.jboss.com/browse/JBoss/jboss-seam/src/main/org/jboss/seam/mock/MockViewHandler.java?r=1.7 ) looks much better to me.

If I understand correctly, it does the following:

If we have suffix mapping for the Seam servlet,  pathInfo is null and the servlet path ends with the configured suffix.  We then need to take this suffix from the servlet path and replace the extension of the viewId with this suffix.

The else branch on the other hand,  I assume, was meant for the case that we have prefix mapping which in turn implies that pathInfo is supposed to be non null.

Cleary, right now with Rev. 1.8 and suffix mapping being active, we always enter the else branch  which is wrong because it is meant for prefix mapping (I suppose).

I don't understand why the if-condition was changed from Strings.isEmpty(pathInfo) in Rev1.7 to Strings.isEmpty(servletPath) in Rev 1.8.



> Exception handling redirects to incorrect URL
> ---------------------------------------------
>
>                 Key: JBSEAM-1776
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1776
>             Project: JBoss Seam
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0.BETA1
>         Environment: Seam version used: CVS Based Seam 2
> JBoss AS 4.2.1 GA
>            Reporter: Wolfgang Schwendt
>            Priority: Critical
>             Fix For: 2.0.0.CR1
>
>
> How to reproduce:
> Deploy the seamdiscs example with the facelets.DEVELOPMENT config parameter set to false in web.xml. (Note: in web.xml, as checked out from the Seam CVS repository, facelets.DEVELOPMENT is set to true, but we need to set it to false in order to test how exceptions are handled).
> After deployment access the following URL:
> http://127.0.0.1:8080/seam-discs/artists.seam?artistId=200&actionOutcome=artist
> In this URL the artistId is deliberately set to a value for which no entity exists in the database. The intention is to trigger an EntityNotFoundException when org.jboss.seam.framework.Home tries to load the artist (entity instance) with id 200.
> What happens after above URL is accessed:
> Seam redirects to
> http://127.0.0.1:8080/seam-discs/artist.seam/error.xhtml?cid=6
> But it actually is supposed to redirect to
> http://127.0.0.1:8080/seam-discs/error.seam?cid=6
> , given the exception definition in pages.xml for the seamdiscs example. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list