A little more detailed answer to the question of Joachim Sauer:
In Ubuntu, at least the tomcat6 meta- tomcat6 depends on the tomcat6 tomcat6-common (and others) libtomcat6-java package, which depends on the libservlet2.5-java package, which depends on the libservlet2.5-java (and others) package. It contains, among other things, the /usr/share/java/servlet-api-2.5.jar and /usr/share/java/jsp-api-2.1.jar , which you need servlet and JSP libraries. Therefore, if you installed Tomcat 6 through apt-get or Ubuntu Software Center, you already have libraries; all that remains is to force Tomcat to use them in your project.
Place the /usr/share/java/servlet-api-2.5.jar and /usr/share/java/jsp-api-2.1.jar libraries in the class path as follows:
For all projects, setting up Eclipse by choosing Window β Settings β Java β Installed JREs, then select the JRE you are using by clicking "Edit", then click "Add External JARs" and then selecting files from the above locations.
For just one project, right-click on the project in Project Explorer, then select Properties β Java Build Path, and then click Add External JARs, and then selecting files from the locations above.
Note 1: These are the correct versions of these libraries for use with Tomcat 6; for other versions of Tomcat, see the table at http://tomcat.apache.org/whichversion.html , although I would suggest that each version of Tomcat includes versions of these libraries that are suitable for it.
Note 2 further: libservlet2.5-java package description ( dpkg-query -s libservlet2.5-java ) says: "Apache Tomcat implements the Sun Microsystems Java Servlet and JavaServer Pages (JSP) specifications and provides a" pure Java "HTTP server An environment for running Java code: This package contains the Java Servlet and the JSP library.
Teemu Leisti Feb 21 2018-12-21T00: 00Z
source share