Hello,
When I am trying to compile the
servlet on page 81, I am getting the following error. Here are the details
D:\MyProjects\beerV1>C:\j2sdk1.4.2_04\bin\javac -classpath c:/Program*/Apache*/Tomcat*/common/lib/servlet-api.jar:classes:. -d classes src/com/example/web/BeerSelect.java
output
*****************************************************************************
src/com/example/web/BeerSelect.java:3: package javax.servlet does not exist
import javax.servlet.*;
^
src/com/example/web/BeerSelect.java:4: package javax.servlet.http does not exist import javax.servlet.http.*;
^
src/com/example/web/BeerSelect.java:7: cannot resolve symbol
symbol : class HttpServlet
location: class com.example.web.BeerSelect
public class BeerSelect extends HttpServlet{
^
src/com/example/web/BeerSelect.java:9: cannot resolve symbol
symbol : class HttpServletRequest
location: class com.example.web.BeerSelect
public void dopost(HttpServletRequest request, HttpServletResponse response)
^
src/com/example/web/BeerSelect.java:9: cannot resolve symbol
symbol : class HttpServletResponse
location: class com.example.web.BeerSelect
public void dopost(HttpServletRequest request, HttpServletResponse response)
^
src/com/example/web/BeerSelect.java:10: cannot resolve symbol
symbol : class ServletException
location: class com.example.web.BeerSelect
throws IOException, ServletException {
^
6 errors
*****************************************************************************
I can understand that the compiler is unable to find the servlet api's. I have development environment set up on D drive and deployment environment set up on C drive.
Can someone help me?
Thank you,
Harish