You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org> on 2007/11/23 18:35:47 UTC
[jira] Resolved: (MYFACES-1694) Myfaces 1.2 doesn't start without
web.xml
[ https://issues.apache.org/jira/browse/MYFACES-1694?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matthias Weßendorf resolved MYFACES-1694.
-----------------------------------------
Resolution: Fixed
Fix Version/s: 1.2.1-SNAPSHOT
big thanks to Bernhard Huemer for fixing this!
> 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
> Fix For: 1.2.1-SNAPSHOT
>
> Attachments: jetty-embedded.zip, MYFACES-1694.patch
>
>
> 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.