I work with VAJ 3.5.2, but I imagine WASD is similar.
I've got the Castor supplied resources in a directory on my classpath.
c:\Projects\Cim\Resources is on my Workspace classpath, and org\exolab\...
folders etc are under c:\Projects\Cim\Resources.
For my application specific xml files, I use an EntityResolver with the
resources on the classpath just like the Castor supplied resources.
Here is how I used the EntityResolver.
try
{
lJdo = new JDO();
lJdo.setDatabaseName("EMAILD1");
EmailEntityResolver lEmailEntityResolver = new
EmailEntityResolver();
InputSource lDatabaseConfiguration =
lEmailEntityResolver.resolveEntity(null,
"castortest/database.xml");
lJdo.loadConfiguration(lDatabaseConfiguration,
lEmailEntityResolver, null);
...
Here is the resolveEntity() method of my EntityResolver.
public org.xml.sax.InputSource resolveEntity(String publicId,
String systemId) throws IOException, SAXException
{
InputStream lInputStream =
ClassLoader.getSystemResourceAsStream(systemId);
if (lInputStream != null)
{
return new InputSource(lInputStream);
}
else
{
throw new IOException("Unable to resolve entity: " +
systemId);
}
}
-----Original Message-----
From: Sylvie RAMON [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 27, 2002 3:06 AM
To: [EMAIL PROTECTED]
Subject: [castor-dev] Location of files
Hi,
I have an another question and i don't find response .
I work with WSAD.
With JDo and xml, we have to work with a lot of file ( xml, dtd, etc.. ) .
I put these files directly on a subdirecory of my project.
In all my applications, i have to put the physical location of these files (
real location "d:\....." or from root of wsad "/workspace/...".
So when an another developper want to work with my application or when i
deploy application on WAS4, i have problems with the location.
I would like to put a logical location. Is it possible??
Is there an another solution to that??
Do i have to put files in a directory out of my projet ??
Thanks for your help.
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev