I'm not very familiar with Tomcat. I'm trying to migrate my application WAR from Tomcat 5.5.28 to 7.0.28. Tomcat 7 uses Servlet 3.0 while my version was using 2.3. My application compiles fine but it gives a runtime error when servletContext.getContext(contextName) returns null while running on Tomcat 7. I changed my web.xml to use Servelet 3.0 but the problem persists.
Can anyone please explain me what should I do to fix this? I'm not sure if I'm on the right track.
A quick check of the JavaDocs seems to indicate no changes to this method. But I did see a warning about syntax. You do need to include a leading slash on the context path you're looking up - "/app2", and not simply "app2". It's possible that wasn't enforced in Tomcat 5.5.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: May 24, 2011
I am looking up using "/contextname" in Tomcat 5.5 as well. Is there anything I'm missing out on?