aspose file tools*
The moose likes Tomcat and the fly likes Problem migrating from 5.5 to 7.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Problem migrating from 5.5 to 7.0" Watch "Problem migrating from 5.5 to 7.0" New topic
Author

Problem migrating from 5.5 to 7.0

Anusha Bhatnagar
Greenhorn

Joined: May 24, 2011
Posts: 9
Hi,

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.

Thanks
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15624
    
  15

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.
Anusha Bhatnagar
Greenhorn

Joined: May 24, 2011
Posts: 9
I am looking up using "/contextname" in Tomcat 5.5 as well. Is there anything I'm missing out on?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15624
    
  15

You could always check the Tomcat management app and ensure that a context named "/contextname" is actually running.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem migrating from 5.5 to 7.0
 
Similar Threads
general query regarding 1Z0-899 exam ?
security permissions problem
Startup problem with JSF1.2
eclipse - server tomcat - dies after 7-8 restarts (Java heap space)
System.out.println messages