You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Sh...@aol.com on 2001/11/08 19:16:59 UTC

Servlet Package does not exist

Hi there:

I just finished writing my first servlet to run it on a tomcat server. I 
extended the HttpServlet interface and import a) javax.servlet.*; and b) 
javax.servlet.http.*;

When I compile the servlet,I got the following error message: that both 
javax.servlet.*, and javax.servlet.http.*; packages do not exist.  

I have JDK1.3 and Tomcat 4.0 successfully installed and on the ClassPath.
Do I have to download another package or what could I be doing wrong? Any 
help is appreciated.

Shoa


Despise not the days of small things.  
                                 Zechariah 4:10.

RE: Servlet Package does not exist

Posted by David Wilson <dw...@revenuetech.com>.
Though what you can do is make a script to look in the directory and add
each .jar file to the classpath. Below is an example for Unix (plz forgive
any typos you see):
	for jars in `ls *.jar`
	do
		CLASSPATH=$CLASSPATH:$jars
	done


David

-----Original Message-----
From: Richard Troy [mailto:rtroy@ScienceTools.com]
Sent: Thursday, November 08, 2001 1:45 PM
To: Tomcat Users List
Subject: Re: Servlet Package does not exist



Shoa,

I had this problem earlier in the week, but probably for a different
reason. You must include in your CLASSPATH the explicit .jar files you
want to use. You can't merely point at directories. As an example, here's
my CLASSPATH, thoughtfully chopped at the colons for you so you don't have
line wrap problems interpreting it. (It must be all one line with no
spaces, of course.) To wit:

/nfs/Installations/Java/jdk1.3/lib/:
/nfs/Installations/Java/jdk1.3/lib/tools.jar:
/opt/Tomcat/4.0.1/common/lib/servlet.jar:
/opt/Tomcat/4.0.1/common/lib/jdbc2_0-stdext.jar:.

Enjoy,
RT

--
Richard Troy, Chief Scientist
Science Tools Corporation
rtroy@ScienceTools.com, 510-567-9957, http://ScienceTools.com/

On Thu, 8 Nov 2001 Shoangizaw@aol.com wrote:

> Date: Thu, 8 Nov 2001 13:16:59 EST
> From: Shoangizaw@aol.com
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: tomcat-user@jakarta.apache.org
> Subject: Servlet Package does not exist
>
> Hi there:
>
> I just finished writing my first servlet to run it on a tomcat server. I
> extended the HttpServlet interface and import a) javax.servlet.*; and b)
> javax.servlet.http.*;
>
> When I compile the servlet,I got the following error message: that both
> javax.servlet.*, and javax.servlet.http.*; packages do not exist.
>
> I have JDK1.3 and Tomcat 4.0 successfully installed and on the ClassPath.
> Do I have to download another package or what could I be doing wrong? Any
> help is appreciated.
>
> Shoa
>
>
> Despise not the days of small things.
>                                  Zechariah 4:10.
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: Servlet Package does not exist

Posted by Richard Troy <rt...@ScienceTools.com>.
Shoa,

I had this problem earlier in the week, but probably for a different
reason. You must include in your CLASSPATH the explicit .jar files you
want to use. You can't merely point at directories. As an example, here's
my CLASSPATH, thoughtfully chopped at the colons for you so you don't have
line wrap problems interpreting it. (It must be all one line with no
spaces, of course.) To wit:

/nfs/Installations/Java/jdk1.3/lib/:
/nfs/Installations/Java/jdk1.3/lib/tools.jar:
/opt/Tomcat/4.0.1/common/lib/servlet.jar:
/opt/Tomcat/4.0.1/common/lib/jdbc2_0-stdext.jar:.

Enjoy,
RT

-- 
Richard Troy, Chief Scientist
Science Tools Corporation
rtroy@ScienceTools.com, 510-567-9957, http://ScienceTools.com/

On Thu, 8 Nov 2001 Shoangizaw@aol.com wrote:

> Date: Thu, 8 Nov 2001 13:16:59 EST
> From: Shoangizaw@aol.com
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: tomcat-user@jakarta.apache.org
> Subject: Servlet Package does not exist
>
> Hi there:
>
> I just finished writing my first servlet to run it on a tomcat server. I
> extended the HttpServlet interface and import a) javax.servlet.*; and b)
> javax.servlet.http.*;
>
> When I compile the servlet,I got the following error message: that both
> javax.servlet.*, and javax.servlet.http.*; packages do not exist.
>
> I have JDK1.3 and Tomcat 4.0 successfully installed and on the ClassPath.
> Do I have to download another package or what could I be doing wrong? Any
> help is appreciated.
>
> Shoa
>
>
> Despise not the days of small things.
>                                  Zechariah 4:10.
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: Servlet Package does not exist

Posted by Jason Terando <ja...@yahoo.com>.
Make sure your JAVA_HOME environment variable points to the directory where
your jdk is installed (ex. /usr/lib/java not /usr/lib/java/jre)

-----Original Message-----
From: Shoangizaw@aol.com [mailto:Shoangizaw@aol.com]
Sent: Thursday, November 08, 2001 10:17 AM
To: tomcat-user@jakarta.apache.org
Subject: Servlet Package does not exist


Hi there:

I just finished writing my first servlet to run it on a tomcat server. I
extended the HttpServlet interface and import a) javax.servlet.*; and b)
javax.servlet.http.*;

When I compile the servlet,I got the following error message: that both
javax.servlet.*, and javax.servlet.http.*; packages do not exist.

I have JDK1.3 and Tomcat 4.0 successfully installed and on the ClassPath.
Do I have to download another package or what could I be doing wrong? Any
help is appreciated.

Shoa


Despise not the days of small things.
                                 Zechariah 4:10.


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>