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