Hi, I am trying to convert the servlet example in the first chapter of the Head First Servlets and JSP book. I have sucessfully installed Tomcat 5.0.30. My path variable is set to " D:\Sun\jwsdp-1.6\jwsdp-shared\bin;D:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\;D:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\Bin;D:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\;D:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\bin\prerelease;D:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\bin;D:\Qt\3.2.1NonCommercial\bin;D:\tomcat\bin;D:\tomcat\common\lib\servlet-api.jar" I have tried setting the classpath in the environment variable instead of using the command line option, but nothing seems to work. Has anyone ever had a similar experience or can anyone profer a solution? Thanks in advance
There aren't may rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.
In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.
One directory that appears to be missing is the current directory "."
You haven't told us why it isn't working, but omitting both the current directory and the directory starting your package means you code will never be found to be compiled.
... and welcome to the Ranch (please change your display name)
I tried c:\jspfiles\project1> javac -classpath .;c:\tomcat\common\lib\servlet-api.jar -d classes src\Ch1Servlet.java
after reading your comments, but it changes nothing. I also tried c:\jspfiles\project1> javac -classpath .;c:\tomcat\common\lib\servlet-api.jar;c:\java\jdk1.5.0_05\lib\tools.jar -d classes src\Ch1Servlet.java
"Fola", please read Bear's request more closely regarding the display name:
In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.
First name, a space, then you last name please.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35220
7
posted
0
So your code has "HtppServlet" and the error message says "HttpServlet"? Did you actually copy and paste the code and the error messages, or did you type it in? Because what's in your message can't be what's actually happening.