Some Web containers don't support context.getRealPath #304
Description
Some Web containers, like Weblogic, do not support ServletContext.getRealPath
for deployed web applications, null values are returned. So the default
configuration for scanning class files in /WEB-INF/classes and /WEB-INF/lib does
not work.
However, Servlet.getResource(), returns file-based URLs, at least for Weblogic,
from which the resolved paths for /WEB-INF/classes and /WEB-INF/lib can be obtained.
See the email here for more details:
https://jersey.dev.java.net/servlets/ReadMsg?list=users&msgNo=508
If the getRealPath("/WEB-INF/classes") returns null then try the
getResource("/WEB-INF/classes) and if it returns a file-based URL then extract
the path. Otherwise thrown an exception saying the the default servlet
configuration cannot be supported.
Environment
Operating System: All
Platform: Sun