Problem: package javax.servlet.jsp does not exist

I am a novice JSP programmer. My projects that use any javax.servlet classes are not seeing those at all. I am working with a group of folks using Java SE 1.5. (Note: I'm using Windows so the directory separator is "\")

What Used to work:

1. Nearly all my projects were working using Java version 1.6. These projects were developed as examples from Wrox and Apress books about JSP and Struts.

What has changed:

1. I un-installed the version 1.6 of JDK and JRE, as well as tomcat, netbeans, and all the associated libraries/jars.

2. I installed version 1.5 of JDK and JRE, as well as tomcat, netbeans, and all the associated libraries/jars.

3. I updated my JAVA_HOME, CATALINA_HOME, CLASSPATH, and PATH environmental variables. I made sure that the path to servlet-api.jar (in the tomcat common\lib) is included in the classpath.

What is wrong:

1. References to javax.servlet.* are not satisfied--they are flagged in the source code in NetBeans and I get compiler errors with any project containing those references. For example:

... package javax.servlet.jsp does not exist

import javax.servlet.jsp.*;

What I've found:

1. My CATALINA_HOME=C:\Java\Tomcat 5.5

2. My JAVA_HOME=C:\Java\jdk1.5.0_11

3. My CLASSPATH=.;C:\Program Files\QuickTime\QTSystem\QTJava.zip;%JAVA_HOME%\lib;%JAVA_HOME%\jre\lib;%JAVA_HOME%\lib\jsp-api.jar;%CATALINA_HOME%\common\lib\servlet-api.jar;C:\Java\logging-log4j-1.2.14\dist\lib\log4j-1.2.14.jar

4. My PATH=c:\wint\BIN;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;%CATALINA_HOME%\bin;C:\MySQL\MySQL Server 5.0\bin;D:\MiKTeX 2.5\miktex\bin;C:\Perl\bin\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\SFU\Perl\bin\;C:\SFU\common\;C:\Program Files\Lahey-Fujitsu Fortran\v7.1\Bin;C:\Program Files\Lahey-Fujitsu Fortran\v7.1\Win32\Bin

What I need:

1. I need to have some reference to the servlet classes satisfied in my configuration. Any help is appreciated.

thanks

jondr

[2117 byte] By [jondra] at [2007-11-27 2:31:11]
# 1

Oh. I got some over-the-shoulder debug help.

My error was in the classpath specification:

The path:%JAVA_HOME%\lib\jsp-api.jar

Should be: %CATALINA_HOME%\lib\jsp-api.jar

That contains the javax.servlet.jsp.*

Thimk.

Message was edited by: jon

jondr

jondra at 2007-7-12 2:45:45 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...