I get a FileNotFoundException when trying to access a file from an object contained in a servlet. The file is in the WEB-INF/classes directory. The war file has been deployed to JBOSS 6.3.
I have tried various ways to access the file:
1) InputStream path = new FileInputStream();
2) ClassLoader cLoader = this.getClass().getClassLoader(); InputStream path = cLoader.getResourceAsStream();
Do I need to list the filename or class names in any of the JBOSS configuration files?
When I run 1) above, I get the FileNotFoundException.
When I run 2) above, I get a ClassNotFoundException. From the servlet I can find the class, but not from the class itself.
Thanks for any help you can give.