when i am compiling a servlet in a command line,as
C:\doct\document\filter\WEB-INF\classes>javac filter.java
its says HTTP request and response is not recognized.
previously there was a method which i have done to fix this problem,but i forget that procedure,somthing i remember,i us to copy some file from apache tomcat to some other location.
i have tomcat6,its working,all enviornment varible has been set.
yaa i think it was jar files.
where i would get it from.From apache tomcat folder??
please specify the path where those jar files are found in apache tomcat folder.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35253
7
posted
0
It's called servlet-api.jar, if memory serves. A quick file search will find it for you.
i need the exact location of those jar files.
i have done it before,but i forget it now.
its in the apache tomcat folder,somwhere i don't know where.
abhishek rathur
Ranch Hand
Joined: Jan 14, 2010
Posts: 64
posted
0
the errors which i am getting.
D:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\abhishek\WEB-INF\
classes>javac demo.java
demo.java:1: package javax.servlet does not exist
import javax.servlet.*;
^
demo.java:2: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
demo.java:4: cannot find symbol
symbol: class HttpServlet public class demo extends HttpServlet ^
demo.java:8: cannot find symbol
symbol : class ServletConfig location: class demo
public void init(ServletConfig s)
^
demo.java:13: cannot find symbol
symbol : class HttpServletRequest location: class demo
public void service(HttpServletRequest req,HttpServletResponse res)
^
demo.java:13: cannot find symbol
symbol : class HttpServletResponse location: class demo
public void service(HttpServletRequest req,HttpServletResponse res)
^
6 errors
thank you anila for your reply.
but i fixed the problem in some other way,i copied all the jar file from the tomcat home to the jave lid/ext folder as the result the above problem is solved,no need to set the class path.
really coool.
thanks again to all Bear Bibeault too.