As question 20378230 points out, IBM WebSphere Application Server (WAS) no longer allows servlets to access files in WEB-INF, except if you set exposeWebInfOnDispatch=true
in server.xml
(false
is the default, as described here).
WEB-INF
used to be my location of choice for servlet configuration data and for JSP, TLD, JSF etc files, in order to protect them from direct client access. Does that mean that all JSF, Struts and similar projects have to use this setting? Or is there an alternative strategy to protect such resources in WAS if they are placed outside WEB-INF
?
AFAIK, with the default setting WEB-INF may contain only resources directly accessed by the application server, such as libraries, class files and web.xml
. Is that correct? Any hints are appreciated.