Thanks...I just came to the same conclusion too.....
URI uri = MyClass.class.getResource("/resources/xsd/Message.xsd").toURI()
which resolves to myWebApp/WEB-INF/classes/resources/xsd/Message.xsd
Matt
Caldarale, Charles R wrote:
>
>> From: Agent96 [mailto:[email protected]]
>> Subject: URI resolving to tomcat/bin
>
>
>> [TOMCAT_HOME]/Webapps/myWebApp/classes/resources/myFile.xml
>
> Classes are normally stored in myWebApp/WEB-INF/classes, but the above is
> acceptable, just unusual (assuming you fix the spelling of "webapps").
>
>> Is this a Tomcat fix or a Java fix......
>
> Neither; fix your webapp. You should be using:
>
> ServletContext.getResourceAsStream("/classes/resources/myFile.xml");
>
> There's no guarantee the container will provide any access to the file
> system, other than the temporary work area defined by the servlet spec.
>
> - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
--
View this message in context:
http://www.nabble.com/URI-resolving-to-tomcat-bin-tp22601353p22603089.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]