cancel
Showing results for 
Search instead for 
Did you mean: 

MyFaces XML experts help needed

Former Member
0 Kudos

Hi,

I have a problem with running myfaces 1.2.6 on CE 7.1 .

The problem is that myfaces does the following to parse web.xml file and fails because the

web.xml file uses namespaces ... so the check

webAppElem.getNodeName().equals("web-app")))) fails

Any suggestions how to get arround this ?????

Thank you.

public WebXml parse()

{

this._webXml = new WebXml();

try

{

DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();

dbf.setIgnoringElementContentWhitespace(true);

dbf.setIgnoringComments(true);

dbf.setNamespaceAware(true);

dbf.setValidating(false);

DocumentBuilder db = dbf.newDocumentBuilder();

db.setEntityResolver(new _EntityResolver(this, null));

db.setErrorHandler(new MyFacesErrorHandler(log));

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

com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl

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!");

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I Will fix bug in myfaces and try to have it integrated in the next relese...