• Post Reply Bookmark Topic Watch Topic
  • New Topic

compile error  RSS feed

 
alan kent
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to compile a servlet but the following message is shown.
HttpServlet - cannot resolve symbol.
I have set the autoexec.bat (as shown below) but
the message still appears.
Does anybody know wht is wrong?
(probably the mistake is at autoexec.bat or some j2ee .jar is missing)
Autoexec.bat
PATH="%PATH%";C:\jdk1.3\bin;
C:\j2sdkee1.3.1\lib\j2ee.jar;
C:\j2sdkee1.3.1\lib\j2ee-ri-svc.jar;
C:\j2sdkee1.3.1\lib\ejb10deployment.jar;
C:\j2sdkee1.3.1\lib\jhall.jar;
C:\mysql\mysql-connector-java-2.0.14

this is the code
import java.servlet.*;
import java.servlet.http*;
public class Example extends HttpServlet{
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException
{
PrintWriter out;
resp.setContentType("text/html");
out=resp.getWriter();
out.println("<html>");
out.println("<body>");
out.println("</body>");
out.println("</html>");
}
}
 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

all jar-files should be set in the CLASSPATH
Rene
[ January 25, 2003: Message edited by: Rene Larsen ]
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, the package is not java.servlet, it's javax.servlet.
Kyle
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!