i have set classpath=".;C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\servlet.jar".
and compiled servlet program on the command line as-
c:\>javac HowdyServlet.java
then also it's not working
any guesses!!
Post up the full text of the error message you get. Java error messages generally tell you what the problem is.
Unless in communicating with it [a computer] one says exactly what one means, trouble is bound to result...
A. Turing
Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.
C:\jwork>javac Howdyservlet.java
Howdyservlet.java:3: package java.servlet.http does not exist
import java.servlet.http.*;
^
Howdyservlet.java:5: cannot find symbol
symbol: class HttpServlet
public class HowdyServlet extends HttpServlet{
^
Howdyservlet.java:6: cannot find symbol
symbol : class HttpServletRequest
location: class HowdyServlet
public void doGet(HttpServletRequest request,
^
Howdyservlet.java:7: cannot find symbol
symbol : class HttpServletResponse
location: class HowdyServlet
HttpServletResponse response)
^
Really need more information about how you are trying to run this. Are you trying to run this within the tomcat container? Did you create the folder structure under "webapps/" yourself and place the compiled class out there? Did you create the TOMCAT_HOME and CATALINA_HOME environment variables?
i have posted same question on multiple forums but none of them figured it out that servlet class is in javax package.
hey senior brother thanks a lot.
this problem have consumed my whole day, i have corrected the above said statement and is working like cheeseeee on the bread.
thanks a lot for the time and the solution.
once again thanks all of you for showing kindness and ofcourse for putting your brains in my problem.
i will continue posting my problems here..
thanks.
Bookmarks