myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul McMahan" <paulmcma...@gmail.com>
Subject jsf 1.2 and jstl 1.2 RI
Date Thu, 15 Feb 2007 21:29:55 GMT
Hello,
I'm using rev 504193 of the current12 branch and tomcat 6.0.8.  My JSF
webapp seems to work OK when I include the core-impl and core-api jars
(along with their deps) in my WEB-INF/lib.  However, a JSP in my web
app that uses JSTL but does *not* use JSF produces an error.

The JSP looks like this:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
java.util.ArrayList mylist = new java.util.ArrayList();
mylist.add("one");
mylist.add("two");
mylist.add("three");
pageContext.setAttribute("mylist", mylist);
%>
<c:forEach var="x" items="${mylist}">
   <p>${x}</p>
</c:forEach>


And the stacktrace is:
java.lang.NullPointerException
	org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.externalContext(ManagedBeanResolver.java:217)
	org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.getValue(ManagedBeanResolver.java:146)
	javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
	javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
	org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:45)
	org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
	org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:101)
	org.apache.jsp.index_jsp._jspx_meth_c_005fforEach_005f0(index_jsp.java:95)
	org.apache.jsp.index_jsp._jspService(index_jsp.java:68)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


This looks like there's a problem in the resolvers where the ELContext
is expected to always have a FacesContext.   Should I open a JIRA for
this?


Best wishes,
Paul

Mime
View raw message