Myfaces 1.2 doesn't start without web.xml
-----------------------------------------

                 Key: MYFACES-1694
                 URL: https://issues.apache.org/jira/browse/MYFACES-1694
             Project: MyFaces Core
          Issue Type: Improvement
          Components: JSR-252
    Affects Versions:  1.2.0
            Reporter: Achim Hügen
            Priority: Minor


Myfaces 1.2 fails with one of these messages if no web.xml can be found or no 
mapping for the FacesServlet is defined:

"Couldn't find web.xml. Abort initializing MyFaces."
"No mappings of FacesServlet found. Abort initializing MyFaces."

That's a quite strict interpretation of the spec which says 
'Implementations may check for the presence of a servlet-class definition of 
class
javax.faces.webapp.FacesServlet in the web application deployment descriptor
as a means to abort the configuration process and reduce startup time for 
applications that do
not use JavaServer Faces Technology.'

It would be helpful for unit tests if the web.xml and a servlet-mapping is not 
mandatory (maybe configurable?).
In my unit tests I start an embedded jetty server whose configuration is build 
programmatically:

Server jettyServer = new Server();
Context webappContext = new Context(jettyServer, contextPath, Context.SESSIONS);
webappContext.addEventListener(new StartupServletContextListener());
ServletHolder facesServletHolder = new ServletHolder(new FacesServlet());
webappContext.addServlet(facesServletHolder, "*.faces");
webappContext.getServer().start();

That code is working fine with Myfaces 1.1 but broken with 1.2.










-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to