This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "compilation Error" Watch "compilation Error" New topic
Author

compilation Error

jaya repaka
Greenhorn

Joined: Nov 06, 2003
Posts: 18
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30085
    
149

You need to put j2ee.jar in your classpath.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, 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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: compilation Error
 
Similar Threads
how to run a servletrunner
javac problems
errors!!
what's wrong with this?
error with compiling servlet