Issue Details (XML | Word | Printable)

Key: APF-856
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Matt Raible
Reporter: Matt Raible
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
AppFuse

404 page doesn't work with JSF 1.2 with maven-jetty-plugin

Created: 29/Aug/07 12:02 PM   Updated: 17/Sep/08 09:50 PM   Resolved: 03/May/08 11:11 PM
Component/s: Web - JSF
Affects Version/s: 2.0-M5
Fix Version/s: 2.0.2


 Description  « Hide
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

2866 by  Matt Raible (20 files)
29/Aug/07 12:21 PM (28 months, 26 days ago)
APF-484: Upgraded to MyFaces 1.2.0 (JSF 1.2) and changed testing to use Shale's Test framework. There is a known issue with the 404 page on Jetty 6.1.5 (http://issues.appfuse.org/browse/APF-856).
appfuse: trunk/web/jsf/src/main/java/org/appfuse/webapp/action/UserForm.java 2866 history download (+22 -15) diffs
appfuse: trunk/web/jsf/src/main/java/org/appfuse/webapp/action/BasePage.java 2866 history download (+12 -27) diffs
appfuse: trunk/web/spring/src/test/java/org/appfuse/webapp/controller/UserControllerTest.java 2866 history download (+1 -1) diffs
appfuse: trunk/web/jsf/pom.xml 2866 history download (+22 -72) diffs
appfuse: trunk/web/jsf/src/main/java/org/appfuse/webapp/action/BasePageTestCase.java 2866 history download (+159 -67) diffs
appfuse: trunk/plugins/appfuse-maven-plugin/src/main/resources/appfuse/web/jsf/list-test.ftl 2866 history download (+21 -9) diffs
appfuse: trunk/archetypes/appfuse-basic-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml 2866 history download (+6 -5) diffs
appfuse: trunk/pom.xml 2866 history download (+5 -5) diffs
appfuse: trunk/web/spring/src/main/java/org/appfuse/webapp/controller/UserController.java 2866 history download (+1 -1) diffs
appfuse: trunk/web/common/src/main/resources/log4j.xml 2866 history download (+5 -0) diffs
appfuse: trunk/archetypes/appfuse-basic-jsf/src/main/resources/archetype-resources/src/main/resources/log4j.xml 2866 history download (+5 -0) diffs
appfuse: trunk/web/jsf/src/test/java/org/appfuse/webapp/action/UserListTest.java 2866 history download (+12 -3) diffs
appfuse: trunk/plugins/appfuse-maven-plugin/src/main/resources/appfuse/web/jsf/form-test.ftl 2866 history download (+21 -5) diffs
appfuse: trunk/web/jsf/src/test/java/org/appfuse/webapp/action/SignupFormTest.java 2866 history download (+13 -3) diffs
appfuse: trunk/web/jsf/src/main/webapp/WEB-INF/faces-config.xml 2866 history download (+6 -5) diffs
appfuse: trunk/web/jsf/src/main/webapp/passwordHint.xhtml 2866 history download (+4 -6) diffs
appfuse: trunk/web/jsf/src/test/java/org/appfuse/webapp/action/PasswordHintTest.java 2866 history download (+14 -5) diffs
appfuse: trunk/web/jsf/src/test/java/org/appfuse/webapp/action/UserFormTest.java 2866 history download (+13 -7) diffs
appfuse: trunk/web/jsf/src/main/webapp/userForm.xhtml 2866 history download (+7 -7) diffs
appfuse: trunk/web/jsf/src/main/webapp/editProfile.xhtml 2866 history download (+2 -3) diffs

Matt Raible added a comment - 13/Sep/07 04:25 PM
If I modify the code as follows, the 404 page will work. However, the ${appConfig["csstheme"]} variable isn't resolved and therefore no stylesheets are rendered.

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);

Matt Raible added a comment - 13/Sep/07 04:27 PM
Posted question to the MyFaces mailing list:

http://tinyurl.com/2rq5s6

Matt Raible added a comment - 13/Sep/07 04:27 PM
Moved to 2.0.1 since this seems to be an issue with Jetty.

Matt Raible made changes - 13/Sep/07 04:27 PM
Field Original Value New Value
Fix Version/s 2.0.1 [ 10092 ]
Fix Version/s 2.0 Final [ 10113 ]
2941 by  Matt Raible (1 file)
13/Sep/07 04:29 PM (28 months, 11 days ago)
APF-856: Hack to (at least) render a 404 page when using Jetty Maven Plugin
appfuse: trunk/web/jsf/src/main/java/org/appfuse/webapp/filter/MessageFilter.java 2941 history download (+9 -0) diffs

Matt Raible added a comment - 14/Sep/07 10:19 AM
Reverted patch from r2941 as it causes success messages to not be rendered:

http://fisheye4.cenqua.com/changelog/appfuse?cs=2941

404 doesn't work with JSF on Jetty, but it works with Tomcat.

Matt Raible added a comment - 24/Nov/07 12:45 PM

Matt Raible added a comment - 24/Nov/07 12:46 PM
Seems to be a bug in Jetty or MyFaces. Since it's not solved by upgrading to Jetty 6.1.6, I'm deferring this bug until it's fixed by one of those libraries.

Matt Raible made changes - 24/Nov/07 12:46 PM
Fix Version/s 2.0.2 [ 10110 ]
Fix Version/s 2.0.1 [ 10092 ]
Matt Raible made changes - 17/Mar/08 02:10 PM
Comment [ http://www.webhaus.com.br/forum/viewtopic.php?t=5170
http://www.webhaus.com.br/forum/viewtopic.php?t=5169
http://www.webhaus.com.br/forum/viewtopic.php?t=5168
http://www.webhaus.com.br/forum/viewtopic.php?t=5167
http://www.webhaus.com.br/forum/viewtopic.php?t=5166
http://www.webhaus.com.br/forum/viewtopic.php?t=5165
http://www.webhaus.com.br/forum/viewtopic.php?t=5164
http://www.webhaus.com.br/forum/viewtopic.php?t=5163
http://www.webhaus.com.br/forum/viewtopic.php?t=5162
http://www.webhaus.com.br/forum/viewtopic.php?t=5161
http://www.webhaus.com.br/forum/viewtopic.php?t=5160
http://www.webhaus.com.br/forum/viewtopic.php?t=5159
http://www.webhaus.com.br/forum/viewtopic.php?t=5158
http://www.webhaus.com.br/forum/viewtopic.php?t=5157
http://www.webhaus.com.br/forum/viewtopic.php?t=5156
http://www.webhaus.com.br/forum/viewtopic.php?t=5155
http://www.webhaus.com.br/forum/viewtopic.php?t=5154
http://www.webhaus.com.br/forum/viewtopic.php?t=5153
http://www.webhaus.com.br/forum/viewtopic.php?t=5152
http://www.webhaus.com.br/forum/viewtopic.php?t=5151
http://www.webhaus.com.br/forum/viewtopic.php?t=5150
http://www.webhaus.com.br/forum/viewtopic.php?t=5149
http://www.webhaus.com.br/forum/viewtopic.php?t=5148
http://www.webhaus.com.br/forum/viewtopic.php?t=5147
http://www.webhaus.com.br/forum/viewtopic.php?t=5146
http://www.webhaus.com.br/forum/viewtopic.php?t=5145
http://www.webhaus.com.br/forum/viewtopic.php?t=5144
http://www.webhaus.com.br/forum/viewtopic.php?t=5143
http://www.webhaus.com.br/forum/viewtopic.php?t=5142
http://www.webhaus.com.br/forum/viewtopic.php?t=5141
http://www.webhaus.com.br/forum/viewtopic.php?t=5140
http://www.webhaus.com.br/forum/viewtopic.php?t=5139
http://www.webhaus.com.br/forum/viewtopic.php?t=5138
http://www.webhaus.com.br/forum/viewtopic.php?t=5137
http://www.webhaus.com.br/forum/viewtopic.php?t=5136
http://www.webhaus.com.br/forum/viewtopic.php?t=5135
http://www.webhaus.com.br/forum/viewtopic.php?t=5134
http://www.webhaus.com.br/forum/viewtopic.php?t=5133
http://www.webhaus.com.br/forum/viewtopic.php?t=5132
http://www.webhaus.com.br/forum/viewtopic.php?t=5131
http://www.webhaus.com.br/forum/viewtopic.php?t=5130
http://www.webhaus.com.br/forum/viewtopic.php?t=5129
http://www.webhaus.com.br/forum/viewtopic.php?t=5128
http://www.webhaus.com.br/forum/viewtopic.php?t=5127
http://www.webhaus.com.br/forum/viewtopic.php?t=5126
http://www.webhaus.com.br/forum/viewtopic.php?t=5125
http://www.webhaus.com.br/forum/viewtopic.php?t=5124
http://www.webhaus.com.br/forum/viewtopic.php?t=5122
http://www.webhaus.com.br/forum/viewtopic.php?t=5121
http://www.webhaus.com.br/forum/viewtopic.php?t=5120
http://www.webhaus.com.br/forum/viewtopic.php?t=5119
http://www.webhaus.com.br/forum/viewtopic.php?t=5118
http://www.webhaus.com.br/forum/viewtopic.php?t=5117
http://www.webhaus.com.br/forum/viewtopic.php?t=5116
http://www.webhaus.com.br/forum/viewtopic.php?t=5115
http://www.webhaus.com.br/forum/viewtopic.php?t=5114
http://www.webhaus.com.br/forum/viewtopic.php?t=5113
http://www.webhaus.com.br/forum/viewtopic.php?t=5112
http://www.webhaus.com.br/forum/viewtopic.php?t=5111
http://www.webhaus.com.br/forum/viewtopic.php?t=5110
http://www.webhaus.com.br/forum/viewtopic.php?t=5109
http://www.webhaus.com.br/forum/viewtopic.php?t=5108
http://www.webhaus.com.br/forum/viewtopic.php?t=5107
http://www.webhaus.com.br/forum/viewtopic.php?t=5106
http://www.webhaus.com.br/forum/viewtopic.php?t=5105
http://www.webhaus.com.br/forum/viewtopic.php?t=5104
http://www.webhaus.com.br/forum/viewtopic.php?t=5103
http://www.webhaus.com.br/forum/viewtopic.php?t=5102
http://www.webhaus.com.br/forum/viewtopic.php?t=5101
http://www.webhaus.com.br/forum/viewtopic.php?t=5100
http://www.webhaus.com.br/forum/viewtopic.php?t=5099
http://www.webhaus.com.br/forum/viewtopic.php?t=5098
http://www.webhaus.com.br/forum/viewtopic.php?t=5097
http://www.webhaus.com.br/forum/viewtopic.php?t=5096
http://www.webhaus.com.br/forum/viewtopic.php?t=5095
http://www.webhaus.com.br/forum/viewtopic.php?t=5093
http://www.webhaus.com.br/forum/viewtopic.php?t=5092
http://www.webhaus.com.br/forum/viewtopic.php?t=5087
http://www.webhaus.com.br/forum/viewtopic.php?t=5086
http://www.webhaus.com.br/forum/viewtopic.php?t=5085
http://www.webhaus.com.br/forum/viewtopic.php?t=5084
http://www.webhaus.com.br/forum/viewtopic.php?t=5083
http://www.webhaus.com.br/forum/viewtopic.php?t=5082
http://www.webhaus.com.br/forum/viewtopic.php?t=5081
http://www.webhaus.com.br/forum/viewtopic.php?t=5079
http://www.webhaus.com.br/forum/viewtopic.php?t=5078
http://www.webhaus.com.br/forum/viewtopic.php?t=5077
http://www.webhaus.com.br/forum/viewtopic.php?t=5076
http://www.webhaus.com.br/forum/viewtopic.php?t=5075
http://www.webhaus.com.br/forum/viewtopic.php?t=5074
http://www.webhaus.com.br/forum/viewtopic.php?t=5073
http://www.webhaus.com.br/forum/viewtopic.php?t=5072
http://www.webhaus.com.br/forum/viewtopic.php?t=5071
http://www.webhaus.com.br/forum/viewtopic.php?t=5070
http://www.webhaus.com.br/forum/viewtopic.php?t=5069
http://www.webhaus.com.br/forum/viewtopic.php?t=5068
http://www.webhaus.com.br/forum/viewtopic.php?t=5067
http://www.webhaus.com.br/forum/viewtopic.php?t=5066
http://www.webhaus.com.br/forum/viewtopic.php?t=5065
http://www.webhaus.com.br/forum/viewtopic.php?t=5064 ]
Matt Raible added a comment - 03/May/08 11:11 PM
Appears to be fixed by upgrading to MyFaces 1.2.2.

Matt Raible made changes - 03/May/08 11:11 PM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Matt Raible made changes - 17/Sep/08 09:50 PM
Comment [ http://www.gnn.com.br/forum/showthread.php?t=1000087664
http://www.gnn.com.br/forum/showthread.php?t=1000087663
http://www.gnn.com.br/forum/showthread.php?t=1000087662
http://www.gnn.com.br/forum/showthread.php?t=1000087661
http://www.gnn.com.br/forum/showthread.php?t=1000087660
http://www.gnn.com.br/forum/showthread.php?t=1000087659
http://www.gnn.com.br/forum/showthread.php?t=1000087658
http://www.gnn.com.br/forum/showthread.php?t=1000087657
http://www.gnn.com.br/forum/showthread.php?t=1000087655
http://www.gnn.com.br/forum/showthread.php?t=1000087654
http://www.gnn.com.br/forum/showthread.php?t=1000087653
http://www.gnn.com.br/forum/showthread.php?t=1000087652
http://www.gnn.com.br/forum/showthread.php?t=1000087651
http://www.gnn.com.br/forum/showthread.php?t=1000087650
http://www.gnn.com.br/forum/showthread.php?t=1000087649
http://www.gnn.com.br/forum/showthread.php?t=1000087647
http://www.gnn.com.br/forum/showthread.php?t=1000087646
http://www.gnn.com.br/forum/showthread.php?t=1000087645
http://www.gnn.com.br/forum/showthread.php?t=1000087643
http://www.gnn.com.br/forum/showthread.php?t=1000087642
http://www.gnn.com.br/forum/showthread.php?t=1000087640
http://www.gnn.com.br/forum/showthread.php?t=1000087639
http://www.gnn.com.br/forum/showthread.php?t=1000087638
http://www.gnn.com.br/forum/showthread.php?t=1000087637
http://www.gnn.com.br/forum/showthread.php?t=1000087636
http://www.gnn.com.br/forum/showthread.php?t=1000087635
http://www.gnn.com.br/forum/showthread.php?t=1000087633
http://www.gnn.com.br/forum/showthread.php?t=1000087554
http://www.gnn.com.br/forum/showthread.php?t=1000087553
http://www.gnn.com.br/forum/showthread.php?t=1000087551
http://www.gnn.com.br/forum/showthread.php?t=1000087550
http://www.gnn.com.br/forum/showthread.php?t=1000087548
http://www.gnn.com.br/forum/showthread.php?t=1000087547
http://www.gnn.com.br/forum/showthread.php?t=1000087546
http://www.gnn.com.br/forum/showthread.php?t=1000087545
http://www.gnn.com.br/forum/showthread.php?t=1000087632
http://www.gnn.com.br/forum/showthread.php?t=1000087631
http://www.gnn.com.br/forum/showthread.php?t=1000087630
http://www.gnn.com.br/forum/showthread.php?t=1000087629
http://www.gnn.com.br/forum/showthread.php?t=1000087628
http://www.gnn.com.br/forum/showthread.php?t=1000087627
http://www.gnn.com.br/forum/showthread.php?t=1000087625
http://www.gnn.com.br/forum/showthread.php?t=1000087624
http://www.gnn.com.br/forum/showthread.php?t=1000087623
http://www.gnn.com.br/forum/showthread.php?t=1000087622
http://www.gnn.com.br/forum/showthread.php?t=1000087621
http://www.gnn.com.br/forum/showthread.php?t=1000087620
http://www.gnn.com.br/forum/showthread.php?t=1000087618
http://www.gnn.com.br/forum/showthread.php?t=1000087617
http://www.gnn.com.br/forum/showthread.php?t=1000087616
http://www.gnn.com.br/forum/showthread.php?t=1000087615
http://www.gnn.com.br/forum/showthread.php?t=1000087614
http://www.gnn.com.br/forum/showthread.php?t=1000087613
http://www.gnn.com.br/forum/showthread.php?t=1000087611
http://www.gnn.com.br/forum/showthread.php?t=1000087610
http://www.gnn.com.br/forum/showthread.php?t=1000087609
http://www.gnn.com.br/forum/showthread.php?t=1000087608
http://www.gnn.com.br/forum/showthread.php?t=1000087607
http://www.gnn.com.br/forum/showthread.php?t=1000087605
http://www.gnn.com.br/forum/showthread.php?t=1000087604
http://www.gnn.com.br/forum/showthread.php?t=1000087603
http://www.gnn.com.br/forum/showthread.php?t=1000087602
http://www.gnn.com.br/forum/showthread.php?t=1000087601
http://www.gnn.com.br/forum/showthread.php?t=1000087600
http://www.gnn.com.br/forum/showthread.php?t=1000087599
http://www.gnn.com.br/forum/showthread.php?t=1000087598
http://www.gnn.com.br/forum/showthread.php?t=1000087597
http://www.gnn.com.br/forum/showthread.php?t=1000087596
http://www.gnn.com.br/forum/showthread.php?t=1000087595
http://www.gnn.com.br/forum/showthread.php?t=1000087592
http://www.gnn.com.br/forum/showthread.php?t=1000087591
http://www.gnn.com.br/forum/showthread.php?t=1000087590
http://www.gnn.com.br/forum/showthread.php?t=1000087588
http://www.gnn.com.br/forum/showthread.php?t=1000087587
http://www.gnn.com.br/forum/showthread.php?t=1000087586
http://www.gnn.com.br/forum/showthread.php?t=1000087585
http://www.gnn.com.br/forum/showthread.php?t=1000087584
http://www.gnn.com.br/forum/showthread.php?t=1000087583
http://www.gnn.com.br/forum/showthread.php?t=1000087582
http://www.gnn.com.br/forum/showthread.php?t=1000087581
http://www.gnn.com.br/forum/showthread.php?t=1000087579
http://www.gnn.com.br/forum/showthread.php?t=1000087578
http://www.gnn.com.br/forum/showthread.php?t=1000087577
http://www.gnn.com.br/forum/showthread.php?t=1000087575
http://www.gnn.com.br/forum/showthread.php?t=1000087574
http://www.gnn.com.br/forum/showthread.php?t=1000087573
http://www.gnn.com.br/forum/showthread.php?t=1000087572
http://www.gnn.com.br/forum/showthread.php?t=1000087571
http://www.gnn.com.br/forum/showthread.php?t=1000087570
http://www.gnn.com.br/forum/showthread.php?t=1000087569
http://www.gnn.com.br/forum/showthread.php?t=1000087568
http://www.gnn.com.br/forum/showthread.php?t=1000087567
http://www.gnn.com.br/forum/showthread.php?t=1000087565
http://www.gnn.com.br/forum/showthread.php?t=1000087564
http://www.gnn.com.br/forum/showthread.php?t=1000087561
http://www.gnn.com.br/forum/showthread.php?t=1000087559
http://www.gnn.com.br/forum/showthread.php?t=1000087558
http://www.gnn.com.br/forum/showthread.php?t=1000087557
http://www.gnn.com.br/forum/showthread.php?t=1000087556
http://www.gnn.com.br/forum/showthread.php?t=1000087555 ]