tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Avinash Sridhar" <>
Subject Compiling a Servlet file
Date Sun, 01 Feb 2004 23:02:01 GMT
hi all,
    I am having trouble in compiling the file,When I type in javac
file,I get the following errors 

/**************Errors while compiling**********************/ package javax.servlet does not exist
import javax.servlet.*;
^ package javax.servlet.http does not exi
import javax.servlet.http.*;
^ cannot resolve symbol
symbol  : class HttpServlet
location: class HelloServlet
public class HelloServlet extends HttpServlet {
                                  ^ cannot resolve symbol
symbol  : class HttpServletRequest
location: class HelloServlet
  public void doGet(HttpServletRequest request,
                    ^ cannot resolve symbol
symbol  : class HttpServletResponse
location: class HelloServlet
                    HttpServletResponse response)
                    ^ cannot resolve symbol
symbol  : class ServletException
location: class HelloServlet
      throws ServletException, IOException {
6 errors

/**************Errors while compiling**********************/

I have written a batch file tomcat.bat like this 

/********** tomcat.bat *************/

set classpath=;E/tomcat/tomcat-5/common/lib/servlet-api.jar
set classpath=;E/tomcat/tomcat-5/common/lib/jsp-api.jar

/********** tomcat.bat *************/

The tomcat.bat file is in the same folder as the source file

Kindly let me know.

Help would be appreciated


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message