farm rubbit hihihihihihi, be aware !!
Steve
farm rubbit hihihihihihi, be aware !!
Originally posted by jad igor:
Hello,
Why im asking this in the first post, just to can use an xml file which i need to keep it in my work directory, but there are other people who develop so each one has the workspace in his privileged location, so the link to the xml file must be generic.
Steve
farm rubbit hihihihihihi, be aware !!
Steve
farm rubbit hihihihihihi, be aware !!
Originally posted by jad igor:
Hi Steve,
i've tried the first approach,
String xmlLocation = servletContext.getRealPath("applicationDescriptor.xml");
the output is :
/home/user/eclipse/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/myproject/applicationDescriptor.xml
But
this is a temporary directory and the xml file is not there, my file is in :
/home/user/eclipse/workspcae/myproject/applicationDescriptor.xml
Originally posted by jad igor:
the second approach :
i've added a resource directory "resources" using the eclipse wizard in my src folder and i've placed my xml file in it, but it returns null :
URL sc = this.getClass().getResource("/resources/applicationDescriptor.xml");
Thank you for your help.
Steve
farm rubbit hihihihihihi, be aware !!