Return-Path: X-Original-To: apmail-myfaces-dev-archive@www.apache.org Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 034FD17DAC for ; Tue, 28 Apr 2015 01:32:07 +0000 (UTC) Received: (qmail 26465 invoked by uid 500); 28 Apr 2015 01:32:06 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 26420 invoked by uid 500); 28 Apr 2015 01:32:06 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 26410 invoked by uid 99); 28 Apr 2015 01:32:06 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Apr 2015 01:32:06 +0000 Date: Tue, 28 Apr 2015 01:32:06 +0000 (UTC) From: "Jay Sartoris (JIRA)" To: dev@myfaces.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (MYFACES-3986) viewScope implicit object not resolved in a JSP page MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MYFACES-3986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14516143#comment-14516143 ] Jay Sartoris commented on MYFACES-3986: --------------------------------------- More specifically, if I remove this block of code from the org/apache/myfaces/el/convert/VariableResolverToELResolver.getValue() method, the scenario above will work: -------------- if (isDefaultLegacyVariableResolver) { // Skip this one because it causes previous EL Resolvers already processed // before this one to be called again. This behavior is only valid if it // is installed a custom VariableResolver. return null; } -------------- > viewScope implicit object not resolved in a JSP page > ---------------------------------------------------- > > Key: MYFACES-3986 > URL: https://issues.apache.org/jira/browse/MYFACES-3986 > Project: MyFaces Core > Issue Type: Bug > Components: JSR-344 > Affects Versions: 2.2.8 > Reporter: Jay Sartoris > > Consider this scenario: > A JSP file has the following contents: > ============= > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > xmlns:f="http://xmlns.jcp.org/jsf/core" > xmlns:c="http://xmlns.jcp.org/jsp/jstl/core" > > > > > > > > > > > ============ > When requested (with the faces mapping), it fails with this exception: > javax.servlet.jsp.JspTagException: > at org.apache.taglibs.standard.tag.common.core.SetSupport.doEndTag(SetSupport.java:195) > at [internal classes] > The reason for that exception is because the target attribute with a value of "viewScope" of the c:set tag was resolved to null. > The Problem: > ----------- > I think the issue here is that the wrong FacesCompositeELResolver is used while processing the tags. From my debugging, I see that there are two FacesCompositeELResolvers created in this scenario and also what is mentioned in the JSF 2.2 spec, section 5.6. One with JSP scope and one with Faces scope. The ImplicitElResolvers created in each of these scopes is different as detailed in the spec. > The problem I see is that when processing the tags, the Faces scoped ELResolvers are created, but not used when processing the c:set tag to resolve the viewScope implicit map. When processing this tag, it will use the JSP scoped resolvers and therefore cannot resolve the viewScope and throws the exception mentioned above because the org.apache.myfaces.el.unified.resolver.implicitobject.ViewScopeImplicitObject is never called as it is only associated with a Faces scoped ImplicitObjectResolver. > Even though this is a JSP file, shouldn't the Faces scoped resolvers be used when this is a JSF file? > > This same scenario works on Mojarra 2.2.10 with Tomcat 8.0.15, but fails when using MyFaces. -- This message was sent by Atlassian JIRA (v6.3.4#6332)