tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Ochani" <ocha...@ncc.edu>
Subject Re: package javax.servlet does not exist import javax.servlet.* ;
Date Mon, 02 Feb 2009 21:28:05 GMT
On 2 Feb 2009 at 18:36, Shaolin wrote:

Send reply to:	Tomcat Users List <users@tomcat.apache.org>
Date sent:	Mon, 02 Feb 2009 18:36:04 +0000
Subject:	Re: package javax.servlet does not exist import javax.servlet.* ;
From:	Shaolin <shaolinfinest@gmail.com>
To:	Tomcat Users List <users@tomcat.apache.org>

> It worked, but how comes I have to use classpath now and not when I
> used to
> do it before ? 

Two different problems. Running tomcat is different from compiling a java servlet application.

It is not recommended to set a systemwide classpath, period.


>is there any way of overcoming this ? Typing up CPs'
> in
> command line takes too much time.
> 

Like Charles pointed out in his reply, use ANT or IDE.

I've used batch and bash scripts also, something like


javac -cp .:/path-to-tomcat/lib/servlet-api.jar:/path-to-additional-jars $1

where $1 is commandline parameter which would be the source file



-Steve O.





> 2009/2/2 Caldarale, Charles R <Chuck.Caldarale@unisys.com>
> 
> > > From: Shaolin [mailto:shaolinfinest@gmail.com]
> > > Subject: Re: package javax.servlet does not exist import
> > > javax.servlet.* ;
> > >
> > > > You'll need to tell javac (or whatever IDE you're
> > > > using) where the servlet-api.jar is.
> > >
> > > How do I do that ?
> >
> > For javac, use the -cp parameter; for any IDE, you'll have to
> consult its
> > documentation.
> >
> >  - Chuck
> >
> >
> > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE
> PROPRIETARY
> > MATERIAL and is thus for use only by the intended recipient. If
> you received
> > this in error, please contact the sender and delete the e-mail and
> its
> > attachments from all computers.
> >
> >
> --------------------------------------------------------------------
> -
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message