tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <>
Subject Re: faulty fix for (javax.servlet does not exist)
Date Sun, 01 Jun 2003 12:15:02 GMT

You have an invalid classpath.  Note that you must add each and every .jar 
file to the classpath.  It is invalid to specify *.jar.  The only way that 
would work is by using a batch file and looping through all jar files in a 
directly and then adding each to the classpath for each iteration.  Fix 
that and your compilation will start working properly.  I'd suggest 
learning about Ant to do you builds as well.


At 01:56 AM 6/1/2003 -0500, you wrote:
>This website says all I have to do
>is put servlet.jar in my classpath to solve my problems.  Unfortunitally,
>it doesn't seem to work.
>This is my path
>$ echo $CLASSPATH
>The classpath is set in the .bashrc, but that should effect the javac
>command right?!?  I've also done the classpath without the *.jar by
>explicitly naming each of the jar files.... talk about a pain.
>This is my error
>$ javac
> package javax.servlet does not exist
>import javax.servlet.*;
> package javax.servlet.http does not exist
>import javax.servlet.http.*;
>these are installed:
>The tomcat lib jar files
>classes $ ls /var/tomcat4/common/lib/
>activation.jar           commons-dbcp.jar         jasper-compiler.jar
>jndi.jar     naming-common.jar     servlet.jar
>ant.jar                  commons-logging-api.jar  jasper-runtime.jar
>jta.jar      naming-factory.jar
>commons-collections.jar  commons-pool.jar         jdbc2_0-stdext.jar
>mailapi.jar  naming-resources.jar
>classes $ ls /var/tomcat4/server/lib/
>catalina-ant.jar        commons-logging.jar     mx4j.license
>servlets-manager.jar      tomcat-jk2.jar
>catalina.jar            commons-modeler.jar     servlets-cgi.renametojar
>servlets-ssi.renametojar  tomcat-jk.jar
>commons-beanutils.jar   jaas.jar                servlets-common.jar
>servlets-webdav.jar       tomcat-util.jar
>commons-digester.jar    jakarta-regexp-1.2.jar  servlets-default.jar
>tomcat-coyote.jar         tomcat-warp.jar
>commons-fileupload.jar  mx4j-jmx.jar            servlets-invoker.jar
>To unsubscribe, e-mail:
>For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message