Bookmark Topic Watch Topic
  • New Topic

Servlet error

 
Maxi Malahleha
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Report post to moderator
C:\MyProjects>javac -classpath "/Tomcat/lib/servlet-api.jar:. " BeerSelect.jav
a
BeerSelect.java:2: package javax.servlet does not exist
import javax.servlet.*;
^
BeerSelect.java:3: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
BeerSelect.java:6: cannot find symbol
symbol: class HttpServlet
public class BeerSelect extends HttpServlet{
^
BeerSelect.java:7: cannot find symbol
symbol : class HttpServletRequest
location: class BeerSelect
public void doPost(HttpServletRequest request,
^
BeerSelect.java:8: cannot find symbol
symbol : class HttpServletResponse
location: class BeerSelect
HttpServletResponse response) throws IOException, ServletExcepti
on{
^
BeerSelect.java:8: cannot find symbol
symbol : class ServletException
location: class BeerSelect
HttpServletResponse response) throws IOException, ServletExcepti
on{
^
6 errors

Please help

this is how I set up my classpath Iam Using (.bat)

set JAVA_HOME=C:\jdk1.5.0_06

PATH=%PATH%;.;C:\jdk1.5.0_06\bin

set CLASSPATH = %CLASSPATH%;.;C:\MyProjects\Tomcat\lib\servlet-api.jar
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Report post to moderator
Duplicate of:
http://www.coderanch.com/t/408729/java/java/Compler-Errors

Bodix,
Please do not cross-post your questions.
You have people trying to help you in the original thread.
Please follow up over there.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!