myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kočí (JIRA) <>
Subject [jira] [Commented] (MYFACES-3587) Not existing viewId will not be handled
Date Mon, 30 Sep 2013 17:37:26 GMT


Martin Kočí commented on MYFACES-3587:

I have this issue too, but the configuration of myfaces has Facelts-VDL only (org.apache.myfaces.SUPPORT_JSP_AND_FACES_EL=false)

In the method : ViewHandlerImpl.createView(FacesContext, String)

getViewHandlerSupport(context).calculateViewId(context, viewId) returns null. Then getViewDeclarationLanguage(context,calculatedViewId).createView(context,calculatedViewId)
throws unreadable NPE instead of java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config:

	at org.apache.myfaces.application.ViewHandlerImpl.createView(
	at javax.faces.application.ViewHandlerWrapper.createView(
	at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(
	at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(
	at org.apache.myfaces.lifecycle.LifecycleImpl.execute(
	at org.apache.myfaces.extensions.cdi.jsf2.impl.listener.phase.CodiLifecycleWrapper.execute(
	at javax.faces.webapp.FacesServlet.service(

> Not existing viewId will not be handled
> ---------------------------------------
>                 Key: MYFACES-3587
>                 URL:
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 2.1.8
>         Environment: Jetty/Tomcat, JUEL, CODI, ExtVal
>            Reporter: Thomas Andraschko
>            Assignee: Leonardo Uribe
> If i call a page, which does not exist, following exceptions occurs: Cannot reset buffer
after response has been committed.
> After digging deeper into this problem, i found out that getViewHandlerSupport()#calculateViewId
returns null and the JspViewDeclarationLanguageStrategy will be used -> 
> Cannot reset buffer after response has been committed. 
> occurs.
> I added a null check for the logicalViewId in RestoreViewExecutor#execute to call HttpServletResponse#sendError.
> It does not work as expected because it just renders the errorPage and no redirect will
be done.
> Why there is not such null check?
> Is it possible to add this check and redirect to the web.xml defined 404 or common error
page? Or should it use the ErrorHandler?

This message was sent by Atlassian JIRA

View raw message