users@glassfish.java.net

Re: Loading files from deployed .WAR

From: <glassfish_at_javadesktop.org>
Date: Sat, 24 Apr 2010 13:10:45 PDT

I solved it. Took the whole day.

I can access WEB-INF trough getServletContext() (url starts with /WEB-INF/...)
And when I do JUnit tests or run some other program in the project that doesn't run on server, then I need to access resources trough FileInputStream(File) (url starts with projectName/WEB-INF/...)
[Message sent by forum member 'questioneverything']

http://forums.java.net/jive/thread.jspa?messageID=398829