I am using castor's XML Mapping to Marshall an Object in my Struts
application. When I load the XML file with FileReader I have to
specifiy and abosulote path in order to avoid throwing a
FileNotFoundException. Could anyone tell me how to use a relative
path with FileReader?
Thanks!
This is the exception when i try to use a relative path:
java.io.FileNotFoundException: user.xml (The system cannot find the
file specified)
This code works with an absolute path:
User testuser = (User) Unmarshaller.unmarshal(User.class,
new
FileReader("C:\\ApacheGroup\\Tomcat4\\webapps\\test_app\\user.xml"));
FYI My Environment is as follows:
Windows XP Pro
Tomcat 4
J2EE 1.4
Struts 1.2.4
Castor 0.9.5.4
--
Tom O'Neill
[EMAIL PROTECTED]
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user