myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Nicolucci <pnico...@us.ibm.com>
Subject Implicit navigation issue with Faces Servlet prefix mapping
Date Wed, 09 May 2012 05:58:43 GMT


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
Mime
View raw message