Hi,

I am using Xerces-2.8. I have a problem to load the schema file to validate the XML.

The validation worked when I was using an absolute path for the schema location.

parser.setProperty(
     "http://apache.org/xml/properties/schema/external-schemaLocation",
            " http://test.com/web/management/request C:\management.xsd");

But the same code has to be ported on Linux/Unix servers, so I tried to give path relative to context root, and placed the xsd file under that path, but it doesn't seem to load the XSD file. For example I tried to put
management.xsd under WEB-INF/classes and tried

parser.setProperty(
     "http://apache.org/xml/properties/schema/external-schemaLocation",
            " http://test.com/web/management/request /WEB-INF/classes/management.xsd");

If I want to keep my XSD file under my context root in app server, how should I specify the path in above property? Any help will be appreciated. Thanks in advance,

Nilesh

Reply via email to