Porting from Tomcat to OC4J
When you start porting an application which contains Servlets watch out for lines using functions from the ServletContext class.
The methods getResource() and getResourceAsStream() take a path parameter. This path allows you to access files in your web application directory structure like "WEB-INF/config.xml".
Using these methods within Tomcat gives you a false sense of security as it silently allows path names without a starting "/". This is contrary to the J2EE API documentation which clearly states that "The path must begin with a "/" and is interpreted
as relative to the current context root."
OC4J very strictly follows the API documentation and specifications and therefore requires the starting "/".
Conclusion: Don't forget the starting "/" if you want to access files with the ServletContext class. It makes your life easier no matter which Servlet container you use.