In order to compile servlets with javac, you will need to include all of the 
jar files found in ...common/lib in your classpath.   Tomcat will include 
them automatically when it starts up for running the servlets but you will 
need to do set up your environment manually in order to compile with javac.

Remember, each jar file needs to be explicitly added to your classpath. Don't 
just add the directory that they are under.






On Sunday 21 September 2003 06:26 am, you wrote:
> Indeed.
> There is a servlet-api.jar under $TOMCAT_HOME/common/lib/
> My Tomcat version is 5.0.0
>
> On Sunday 21 September 2003 11:42, BAO RuiXian wrote:
> > Bruno Costacurta wrote:
> > > It seems you miss J2EE.
> > > After installation (from www.java.sun.com/j2ee)
> > > you should find j2ee.jar (under $J2EE_HOME/lib/) which contain
>
> javax.servlet.*
>
> > > Hope it helps.
> >
> > Maybe. But, there should also be a servlet.jar in
> > %TOMCATHOME%/common/lib directory. At least I have it for my tomcat
> > 4.18. And water autumn cannot find it in TOMCAT 5.0.0
> >
> > Best
> >
> > Bao
> >
> > > On Saturday 20 September 2003 17:45, water autumn wrote:
> > >>hello:
> > >>   My environment is follow:
> > >>              JDK :  j2sdk_1.4.2_01
> > >>              Web Server :  TOMCAT 5.0.0
> > >>   When i devloped servlet program, such as test.java, while i typed
> > >> this line :
> > >>"import javax.servlet.*;", javac tell me the error:
> > >>"
> > >>F:\JAVA\upload\AccUpload.java:8: package javax.servlet.http does not
> > >> exist import javax.servlet.http.*;"
> > >>
> > >>why? can you tell me how i can resolve it?
> > >>i can't find serlet.jar in directory"TOMCAT\common\lib"
> > >>
> > >>                                                       water autumn
> >
> > ---------------------------------------------------------------------
> > 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]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to