Set Linux CLASSPATH to compile Tomcat servlet & JSP classes
Servlets and JSP pages are not part of the Java 2 platform. You therefore need identify the servlet classes to the compiler. Here's how:
Open the /root/.bash_profile file, and add the following lines:
CLASSPATH=$CLASSPATH:/tomcat-5.5.17/common/lib/servlet-api.jar:/tomcat-5.5.17/common/lib/jsp-api.jar
export CLASSPATH
This points the javac compiler to the servlet and JSP JAR files that are included in Tomcat 5.5.17. After this change, compilation of servlets and JSP's should work without error.
Open the /root/.bash_profile file, and add the following lines:
CLASSPATH=$CLASSPATH:/tomcat-5.5.17/common/lib/servlet-api.jar:/tomcat-5.5.17/common/lib/jsp-api.jar
export CLASSPATH
This points the javac compiler to the servlet and JSP JAR files that are included in Tomcat 5.5.17. After this change, compilation of servlets and JSP's should work without error.
<< Home