If JibxManager is a class you wrote, couldn't you have the servlet
resolve the path to resources using ServletContext.getResource(
"/webapp-relative/path/to/my/resources" ).getPath() and then pass that
in on the JibxManager constructor? The only achilles heal here is the
ServletContext.getResource() method won't work from a .war archive. The
webapp has to be an expanded folder.
--David
nformosa wrote:
So, this is my layout..
I've got a servlet which handles the requests.
The servlet than instantiates another class. This class called JibxManager
(using jibx), then handles the requests and Marshals the xml request. The
JibxManager also handles xsd verification, so it has to load the xsd. This
xsd is one of the files i need to be loaded properly.
the xsd is accessed as follows:
this.requestSchema = schemaFactory.newSchema(new
File(requestSchemaLocation));
where requestSchemaLocation = "resources/jibx/schema/myschema.xsd"
Thanks again
Peter Crowther wrote:
From: nformosa [mailto:[EMAIL PROTECTED]
I'm accesing these files using relative paths ie:
/resources/config.xml
What code are you using to locate these files? Hopefully something to
do with the servlet spec? See, for example,
ServletContext.getResource(String).
- Peter
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]