I have installed Tomcat 5.5 in windows vista home basic. I have set classpath to
“C:\program files\apache software foundation\tomcat 5.5\common\lib\servlet-api.jar”.
now there are two problems.
1. I could not compile my servlets. It says package javax.servlet.* dosenot exist.
2. I could not connect with local host in chrome nor in explorer.
these errors are appearing inspite of server instance running.
Classpath to java sdk and tomcat are different. is it the matter of concern.
Please help.
I have invested considerable amount of time figuring out the problem.
thanx in advance.
It means that the classpath for
javacis not been correctly specified. It should go like so:Note that you need to surround a path with spaces by doublequotes.
Then you used the wrong domain/port. When running Tomcat at the local machine, the domain should at least be
localhost. The actual port can be determined inTomcat/conf/server.xmlfile. It defaults to8080, but can be changed during the Windows setup wizard. The final URL should look like http://localhost:8080. If you use port80which is the default HTTP port, then the:80part can be omitted from the URL.The
%CLASSPATH%environment variable is worthless. Use-cpargument. If you want to avoid long typing/remembering everytime, consider using a.batfile with the command, or a build tool like Ant, or an IDE like Eclipse.The
%JAVA_HOME%environment variable is however important. Tomcat needs to know it in order to have access to the toolset to compile JSP files. The%JAVA_HOME%should point to the installation directory of the JDK.