• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

compilation Error

 
jaya repaka
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I downloaded tomcat4.1.29 and server is running.I wrote a simple program
Cannot resolve symbol:HttpRequest
class :Hellos
Cannot resolve symbol:HttpResponse
class :Hellos
Cannot resolve symbol:ServletException
class :Hellos
Cannot resolve symbol:
import javax.servlet.http.*;
my program is :import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class Hellos extends HttpServlet{
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException,IOException{
PrintWriter out=res.getWriter();
out.println("hello");
}
}
Please help me in this topic , I am new to this platform
my Email id is jayarepaka@rediffmail.com
Thank u in advance
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34656
366
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to put j2ee.jar in your classpath.
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, since the person has only indicated an installation of Tomcat, we don't know for sure that j2ee.jar is available.

However, CATALINA_HOME/common/lib/servlet.jar is available, and should be placed in the classpath.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic