File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes compilation Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "compilation Error" Watch "compilation Error" New topic

compilation Error

jaya repaka

Joined: Nov 06, 2003
Posts: 18
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*;
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();
Please help me in this topic , I am new to this platform
my Email id is
Thank u in advance
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33102

You need to put j2ee.jar in your classpath.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

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.
I agree. Here's the link:
subject: compilation Error
It's not a secret anymore!