Andrea Patterson

Greenhorn
+ Follow
since Apr 14, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Andrea Patterson

I'm doing the first project in the HeadFirst JSP & Servlets book. I'm getting the following errors when compiling a servlet:
C:\jakarta-tomcat-5.5.9\webapps\Beer-v1>javac -classpath %classpath% WEB-INF\src\com\Example\web\BeerSelect.java
WEB-INF\src\com\Example\web\BeerSelect.java:13: cannot find symbol
symbol : method setContentType(java.lang.String)
location: class javax.servlet.http.HttpServlet
response.setContentType("text/html");
^
WEB-INF\src\com\Example\web\BeerSelect.java:14: cannot find symbol
symbol : method getWriter()
location: class javax.servlet.http.HttpServlet
PrintWriter out = response.getWriter();
^
WEB-INF\src\com\Example\web\BeerSelect.java:16: cannot find symbol
symbol : method getParameter(java.lang.String)
location: class javax.servlet.http.HttpServlet
String c = request.getParameter("color");
^
3 errors
------------------------------------------------------------
Before I added the classpath I was getting errors that it couldn't find import files: javax.servlet.*; and javax.servlet.http.*;
Now it's not finding methods.
Has anyone experienced this problem?

Thanks,

Andrea
17 years ago