Hmm interresting. Generally the webapp mapping is in the default namespace is it not? I don't know if J2EE is spec'd this way but most webapp that I've seen are done this way.

I'm not a bit fan of using getLocalName in general becuase it can lead to conflicts. That said, if someone defines a web-xml element in thier schema, they should be shot. ;)

Write up a bug and submit a patch and maybe we can get it in.

Scott

Sent from my iPhone

On Dec 9, 2009, at 2:31 PM, <dagnino.thie...@hydro.qc.ca> wrote:

         Hi,


   I'm having problems integrating myfaces 1.2.6 with SAP Java
Server (Java 1.5)

   The problem , I found was in the code for
org.apache.myfaces.shared_impl.webapp.webxml.WebXmlParser parse()
method.

   the parse method does the following

   ****
   InputSource is = createContextInputSource(null,
"/WEB-INF/web.xml");

         if (is == null)
         {
           URL url = this._context.getResource("/WEB-INF/web.xml");
           log.debug("No web-xml found at : " + ((url == null) ? "
null " : url.toString()));
           return this._webXml;
         }

         Document document = db.parse(is);

         Element webAppElem = document.getDocumentElement();
         if ((webAppElem == null) ||
(!(webAppElem.getNodeName().equals("web-app"))))
           throw new FacesException("No valid web-app root element
found!");
   *****

   but the JDK 1.5 implementation is namespace aware so the return
of getNodeName is in our system ns1:web-app

   I think the implementation should do getLocalName() instead of
getNodeName ...

   Does anyone have a suggestion to how to get arround this... I'm
sure someone else has a system where the web.xml file has namespaces in
it ...

   Thank you and sorry if this question is not posted at the right
place... if so please redirect me to the right list.

   Thanks again.


   Thierry Dagnino



Reply via email to