On Thu, 24 Feb 2005 14:45:40 -0500, Virtudazo, Dennis (Exchange) <[EMAIL PROTECTED]> wrote: > The application server needs to know the mapping so it can invoke the > FacesServlet when the url matches the mapping. But why would the > FacesServlet itself need to know its mapping? >
It's not FacesServlet itself that needs to know ... it's the implementation of ViewHandler. The specification requirements for renderView() and restoreView() are defined in terms of understanding this, because it does things like map /foo.jsp to /foo.faces (if you are using extension mapping) or to /faces/foo.jsp (if you are using prefix mapping). > I didn't have a problem with the RI regarding validation of the web.xml. > I don't think the RI is even parsing the web.xml; it doesn't have a > context startup listener, unlike MyFaces. Actually, the RI *does* use a servlet context listener (com.sun.faces.confg.ConfigureListener). It's not required in web.xml because the RI lists this as a listener in the TLD for the tag library, which is embedded in the JAR file and therefore is implicitly registered. Looking at the RI implementation (it's available at java.net), the parse of web.xml has actually been pulled out (it was in the EA version for sure), and replaced by an algorithm that depends on null versus non-null values for servlet path and path info (ViewHandlerImpl.getMappingForRequest) -- that code looks like it might fail in some scenarios that I need to investigate further. Craig > > -----Original Message----- > Wrom: ZAAFXISHJEXXIMQZUIVOTQNQEMSFDULHPQQWOYIYZUNN > Sent: Thursday, February 24, 2005 1:05 PM > To: Virtudazo, Dennis (Exchange) > Cc: MyFaces Discussion; [EMAIL PROTECTED] > Subject: Re: MyFaces with Weblogic > > On Thu, 24 Feb 2005 09:29:45 -0500, Virtudazo, Dennis (Exchange) > <[EMAIL PROTECTED]> wrote: > > Btw, it wasn't the parsing of faces-config.xml that was causing the > > problem. It was the parsing of the web.xml. I don't know why MyFaces > > (its ServletContextListener) is even trying to parse web.xml, I would > > think web.xml is already parsed by the application server and anything > > > MyFaces needs is available through the j2ee api. > > Any JSF implementation is going to need to know how FacesServlet is > mapped (i.e. /faces/* or *.faces). However, there's no API in the > servlet spec to ask the container for that information, so it has to be > parsed again by the JSF implementation. > > The RI does the same thing. > > Craig > > *********************************************************************** > Bear Stearns is not responsible for any recommendation, solicitation, > offer or agreement or any information about any transaction, customer > account or account activity contained in this communication. > *********************************************************************** > >

