javax.servlet does not exist (please help)
i was going to try my first example nad follwing head first
package com.myweb.trying;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
publicclass Serv1extends HttpServlet{
publicvoid doPost(HttpServletRequest request,HttpServletResponse response)throws IOException,ServletException{
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("Shutup and see this");
String c = request.getParameter("color");
out.println("<be>the color selected is"+ c);
}
}
on giving the command
C:\project1\app1>javac -classpath c:\Tomcat6\lib\servlet-api.jar:classes:. -d classes src\com\myweb\trying\Serv1.java
this is what i got
src\com\myweb\trying\Serv1.java:3:package javax.servlet does not exist
import javax.servlet.*;
^
src\com\myweb\trying\Serv1.java:4:package javax.servlet.http does not exist
import javax.servlet.http.*;
^
src\com\myweb\trying\Serv1.java:7: cannot find symbol
symbol:class HttpServlet
publicclass Serv1extends HttpServlet{
^
src\com\myweb\trying\Serv1.java:8: cannot find symbol
symbol :class HttpServletRequest
location:class com.myweb.trying.Serv1
publicvoid doPost(HttpServletRequest request,HttpServletResponse respon
se)throws IOException,ServletException{
^
src\com\myweb\trying\Serv1.java:8: cannot find symbol
symbol :class HttpServletResponse
location:class com.myweb.trying.Serv1
publicvoid doPost(HttpServletRequest request,HttpServletResponse respon
se)throws IOException,ServletException{
^
src\com\myweb\trying\Serv1.java:8: cannot find symbol
symbol :class ServletException
location:class com.myweb.trying.Serv1
publicvoid doPost(HttpServletRequest request,HttpServletResponse respon
se)throws IOException,ServletException{
^
6 errors
please help what im doing wrong
i have latest ver.6 of tomcat installed

