You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Leonardo Uribe <lu...@gmail.com> on 2012/05/09 13:22:18 UTC

Re: Implicit navigation issue with Faces Servlet prefix mapping

Hi

It seems we have here an inconsistency, probably because the viewId is
supposed to start with /, but it seems the reference implementation
assume viewId without / are valid too. I'll check that part but I
don't have time for now, so please be patient. It will take some time.

regards,

Leonardo Uribe

2012/5/9 Paul Nicolucci <pn...@us.ibm.com>:
> Hello All,
>
> I've come to a problem and wanted to discuss it with the community to get
> your input and make sure I'm debugging this correctly.
>
> I have an application which was posted in MyFaces-3530
> (ViewExpiredException.war) which uses a custom ExceptionHandler to deal with
> a ViewExpiredException.  Everything looks to be working as expected with
> this when I'm using a Faces Servlet Mapping such
> as the following (suffix mapping):
>
> <servlet-mapping>
>     <servlet-name>Faces Servlet</servlet-name>
>     <url-pattern>*.jsf</url-pattern>
>   </servlet-mapping>
>
>
> However if I use something such as this (prefix mapping):
>
> <servlet-mapping>
> <servlet-name>Faces Servlet</servlet-name>
> <url-pattern>/f/*</url-pattern>
> </servlet-mapping>
>
> I get the following exception when doing implicit navigation in my Exception
> Handler such as:
>
> nav.handleNavigation(fc, null, "viewExpired");  // viewExpired.xhtml exists
> in the web application
>
> Exception:
> Caused by: org.apache.myfaces.lifecycle.ViewNotFoundException: A view is
> required to execute RENDER_RESPONSE(6)
> at
> org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:62)
> at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:239)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:191)
>
> This happens due to the following fix:
> https://issues.apache.org/jira/browse/MYFACES-3188
>
> Is this working as designed or a bug?  It seems we are in accordance with
> the Spec, specifically Section 7.5.2, it just seems odd to me that we can't
> use implicit navigation such as "viewExpired" when we use prefix mapping and
> we need
> to use "viewExpired.xhtml", whereas with suffix mapping "viewExpired" works
> just fine since we end up using the default facelet suffix (.xhtml) and
> finding the resource.
>
> Thoughts?
>
> Thanks,
>
> Paul Nicolucci

Re: Implicit navigation issue with Faces Servlet prefix mapping

Posted by Paul Nicolucci <pn...@us.ibm.com>.
I'm going to open a JIRA bug for this issue.  I've done a bunch of
debugging and I've narrowed it down.  I'll document my findings in the
issue, I have a couple of questions I
can ask there and we can come to a solution.

Thanks,

Paul Nicolucci


                                                                           
             Leonardo Uribe                                                
             <lu4242@gmail.com                                             
             >                                                          To 
                                       MyFaces Development                 
             05/09/2012 07:22          <de...@myfaces.apache.org>            
             AM                                                         cc 
                                                                           
                                                                   Subject 
             Please respond to         Re: Implicit navigation issue with  
                 "MyFaces              Faces Servlet prefix mapping        
               Development"                                                
             <dev@myfaces.apac                                             
                  he.org>                                                  
                                                                           
                                                                           
                                                                           




Hi

It seems we have here an inconsistency, probably because the viewId is
supposed to start with /, but it seems the reference implementation
assume viewId without / are valid too. I'll check that part but I
don't have time for now, so please be patient. It will take some time.

regards,

Leonardo Uribe

2012/5/9 Paul Nicolucci <pn...@us.ibm.com>:
> Hello All,
>
> I've come to a problem and wanted to discuss it with the community to get
> your input and make sure I'm debugging this correctly.
>
> I have an application which was posted in MyFaces-3530
> (ViewExpiredException.war) which uses a custom ExceptionHandler to deal
with
> a ViewExpiredException.  Everything looks to be working as expected with
> this when I'm using a Faces Servlet Mapping such
> as the following (suffix mapping):
>
> <servlet-mapping>
>     <servlet-name>Faces Servlet</servlet-name>
>     <url-pattern>*.jsf</url-pattern>
>   </servlet-mapping>
>
>
> However if I use something such as this (prefix mapping):
>
> <servlet-mapping>
> <servlet-name>Faces Servlet</servlet-name>
> <url-pattern>/f/*</url-pattern>
> </servlet-mapping>
>
> I get the following exception when doing implicit navigation in my
Exception
> Handler such as:
>
> nav.handleNavigation(fc, null, "viewExpired");  // viewExpired.xhtml
exists
> in the web application
>
> Exception:
> Caused by: org.apache.myfaces.lifecycle.ViewNotFoundException: A view is
> required to execute RENDER_RESPONSE(6)
> at
> org.apache.myfaces.lifecycle.RenderResponseExecutor.execute
(RenderResponseExecutor.java:62)
> at org.apache.myfaces.lifecycle.LifecycleImpl.render
(LifecycleImpl.java:239)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:191)
>
> This happens due to the following fix:
> https://issues.apache.org/jira/browse/MYFACES-3188
>
> Is this working as designed or a bug?  It seems we are in accordance with
> the Spec, specifically Section 7.5.2, it just seems odd to me that we
can't
> use implicit navigation such as "viewExpired" when we use prefix mapping
and
> we need
> to use "viewExpired.xhtml", whereas with suffix mapping "viewExpired"
works
> just fine since we end up using the default facelet suffix (.xhtml) and
> finding the resource.
>
> Thoughts?
>
> Thanks,
>
> Paul Nicolucci