Thanks for the advice.  As I move forward, I'll consider this approach to
generalizing the location of the xml files.

As far as the security context, is there a way to make Castor look for the
castor.properties in a folder that's inside my security context?  Right now,
it's looking for that file in $JAVA_HOME/jre/lib , as if it was hardcoded to
look there (obviously, I've not set that in my code anywhere).

Thanks again,
Rob Kent

----- Original Message -----
From: "Robert Cooper" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, January 26, 2003 3:53 PM
Subject: Re: [castor-dev] Re: JSP Integration

I worked around this problem with my database.xml and mappings.xml by
setting up an initializer servlet that loads first in my servlet context
that uses the servletContext.getResource() method to pass out a URL. In
Tomcat this resolves to something like "jndi:/WEB-INF/classes", but it
should work with any application server to provide a URL object to the
proper files, when you can then call .toExternalForm() on when
initializing castor.

As to access control exceptions, you should look at the security context
your servlet engine is running in. Generally Tomcat 4.1.X and WebLogic
6+ (that I know about) reset the security context for each application
to only have access to it's deployment directory. Any attempt to read or
write outside of that will throw and access exception no matter what the
user-level permission on the folder are.

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to