Check your environment variables.

CATALINA_HOME   c:\tomcat or wherever you installed tomcat
Seem you have this set properly

CLASSPATH
c:\j2sdk1.4.2_03;c:\tomcat\common\lib\servlet-api.jar;c:\tomcat\common\lib\j
sp-api.jar;c:\tomcat\common\lib\tools.jar;.
There are different ways to do this but it seems like you need to have 
The servlet-api/jar in your CLASSPATH variable.  Mine is in
c:\tomcat\common\lib

JAVA_HOME               c:\j2sdk1.4.2_03 or wherever you installed the jdk

PATH                    C:\Perl\bin\;C:\j2sdk1.4.2_03\bin\.....
Be sure to have the bin directory under your jdk installation included.

-----Original Message-----
From: Venkat & Radha Venkataramanan [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 30, 2004 7:09 AM
To: 'Tomcat Users List'
Subject: Question from a newbie! Please pardon me!

Hello:

 

When I tried to compile my first servlet, using the command line,

 

javac -classpath $CATALINA_HOME/common/lib/servlet-api.jar HelloWorld.java

 

I get the following errors, mainly due to the fact that it's unable to find
the package javax.servlet.

 

HelloWorld.java:6: package javax.servlet does not exist

import javax.servlet.*;

^

HelloWorld.java:7: package javax.servlet.http does not exist

import javax.servlet.http.*;

^

HelloWorld.java:9: cannot resolve symbol

symbol  : class HttpServlet

location: class HelloWorld

public class HelloWorld extends HttpServlet {

                                ^

HelloWorld.java:11: cannot resolve symbol

symbol  : class HttpServletRequest

location: class HelloWorld

        public void doGet ( HttpServletRequest request, HttpServletResponse
resp

onse )

                            ^

HelloWorld.java:11: cannot resolve symbol

symbol  : class HttpServletResponse

location: class HelloWorld

        public void doGet ( HttpServletRequest request, HttpServletResponse
resp

onse )

                                                        ^

HelloWorld.java:12: cannot resolve symbol

symbol  : class ServletException

location: class HelloWorld

        throws ServletException, IOException    {

               ^

6 errors

 

Can somebody guide me on how to resolve this issue?

 

Thanks.

 

Venkat




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

Reply via email to