On 2 Feb 2009 at 18:36, Shaolin wrote:

Send reply to:  Tomcat Users List <[email protected]>
Date sent:      Mon, 02 Feb 2009 18:36:04 +0000
Subject:        Re: package javax.servlet does not exist import javax.servlet.* 
;
From:   Shaolin <[email protected]>
To:     Tomcat Users List <[email protected]>

> 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 <[email protected]>
> 
> > > From: Shaolin [mailto:[email protected]]
> > > 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: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> >
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to