No, files needs to be accessed from a JSP should be extracted from .war file.
No, such files can be accessed only from a servlet.
Yes, I would programmatically extract file and place it to temporary dir.
Yes, use InputStream class and relative path:
InputStream inStream = getClass().getResourceAsStream("/img/icon.jpg");
Yes, I would use InputStream class and absolute path:
InputStream inStream = getClass().getResourceAsStream("my.war/img/icon.jpg");
|