myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthias Weßendorf (JIRA) <...@myfaces.apache.org>
Subject [jira] Resolved: (MYFACES-1694) Myfaces 1.2 doesn't start without web.xml
Date Fri, 23 Nov 2007 17:35:47 GMT

     [ 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.


Mime
View raw message