Friday, 12 October 2012

Web projects have a "No org.apache.tomcat.InstanceManager set in ServletContext"

When creating a web project in eclipse I keep geting an error "No org.apache.tomcat.InstanceManager set in ServletContext" within the JSP files created and placed into the work folder. While it does not stop the project running it is very anoying.
It can be easily fixed by adding the tomcat-api.jar to your list or libraries.
I recommend you add it as follows:
  1. Start to edit your project class path;
  2. Click add variable;
  3. Click the TOMCAT_HOME variable followed by the Extend... button; This will allow you to browse for the libs/tomcat-api.jar file;
  4. Click OK and you should get the following in your list of directories:
And you are done ... In this way it will be portable to someone elses PC.

An interesting article on stackoverflow can be found here : http://stackoverflow.com/questions/8064039/why-shouldnt-we-place-tomcat-library-in-our-appln-libraries

No comments:

Post a Comment