[JAVAEETUTORIAL-203] rsvp example's welcome-file and Faces servlet mapping not being respected Created: 26/Jun/13 Updated: 08/Jul/13 Resolved: 08/Jul/13
|Reporter:||Ian Evans||Assignee:||Ian Evans|
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
In jaxrs/rsvp, we have the following web.xml file:
However, if you go to the context root (say, http://localhost:8080/rsvp/) you get a 404 error. The welcome-file setting isn't being respected.
If you change the Faces servlet mapping and welcome-file to:
You get nothing but 404 errors at any URL.
After investigating, Ed Burns suspects a bug in the GlassFish 4 web container.
|Comment by Ian Evans [ 08/Jul/13 ]|
The problem was a conflict between the JAX-RS application path in RsvpApplication ("/") and the FacesServlet mapping in web.xml. The 404 was being sent by the JAX-RS runtime. Evidently, if there is a conflict between a JAX-RS annotation and servlet mapping, the annotation wins.
I changed the application path in RsvpApplication to "/webapi" and the target URIs in the client code. Now everything works.