When viewing a page that doesn't exist, the following (from messages.jsp) throws the error below:
<c:if test="${not empty errors}">
<div class="error" id="errorMessages">
<c:forEach var="error" items="${errors}">
<img src="<c:url value="/images/iconWarning.gif"/>"
alt="<fmt:message key="icon.warning"/>" class="icon" />
<c:out value="${error}" escapeXml="false"/><br />
</c:forEach>
</div>
</c:if>
Caused by: javax.faces.el.EvaluationException: ELResolver cannot handle a null base Object with identifier 'errors'
Everything works fine on Tomcat 6.0.14.
http://www.nabble.com/Is-it-possible-to-exclude-commons-el-as-a-dependency-with-the-maven-jetty-plugin--tf4348944.html#a12391297
Index: src/main/java/org/appfuse/webapp/filter/MessageFilter.java
===================================================================
--- src/main/java/org/appfuse/webapp/filter/MessageFilter.java (revision 2936)
+++ src/main/java/org/appfuse/webapp/filter/MessageFilter.java (working copy)
@@ -1,6 +1,7 @@
package org.appfuse.webapp.filter;
import java.io.IOException;
+import java.util.ArrayList;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
@@ -31,6 +32,10 @@
if (messages != null) {
request.setAttribute("messages", messages);
request.getSession().removeAttribute("messages");
+ } else {
+ // workaround for issue with Jetty 6.1.5 (Maven Plugin) and MyFaces 1.2.0
+ // http://issues.appfuse.org/browse/APF-856
+ request.setAttribute("messages", new ArrayList());
}
// grab errors from the session and put them into request
@@ -40,6 +45,10 @@
if (errors != null) {
request.setAttribute("errors", errors);
request.getSession().removeAttribute("errors");
+ } else {
+ // workaround for issue with Jetty 6.1.5 (Maven Plugin) and MyFaces 1.2.0
+ // http://issues.appfuse.org/browse/APF-856
+ request.setAttribute("errors", new ArrayList());
}
chain.doFilter(req, res);