Can't run servlet or applet
Hi, I am new to Java servlets, so please bare with me and help if you can.
First I will tell you what I have and done to this point.
Running Win2000 Professional on D drive
Installed IIS and www services
Installed jdk1.4
installed FreeJava to compile code.
Added %SysstemRoot%\jdk1.4\bin to PATH in environment variables. Note Tried D:\jdk1.4\bin
Installed th Java 2 runtime environment.
Used FreeJava to create a simple servlet.
Saved it to the d:\inetpub\wwwroot\servlet directory and compiled it. Compiled with no errors.
Used Internet explorer and accessed the file by typing http://localhost/servlet/example1.html
The html page comes up fine but when I click the submit buttom, I get "Page not found" screen.
Here's the code I used.
HTML saved as example1.html
<HTML><HEAD><TITLE>WhatIsYourName</TITLE>
</HEAD>
<BODY>
<FORM METHOD=GETACTION="/servlet/whatName">
If you don't mind me asking, what is your name?
<INPUT TYPE=TEXT NAME="name"><P>
<INPUT TYPE=SUBMIT>
</FORM>
</BODY>
</HTML>
Java Servlet code saved as "whatName"
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class whatName extends HttpServlet
{ public void doGet(HttpServletRequest req,HttpServletResponse res)
throws ServletException, IOException
{
res.setContentType("text/html");
PrintWriter out = res.getWriter();
String name = req.getParameter("name");
out.println("<HTML>");
out.println("<HEAD><TITLE>Hello " + name +", how are you?</TITLE></HEAD>");
out.println("<BODY>");
out.println("Hello again, " + name);
out.println("</BODY></HTML>");
}
public String getServletInfo()
{
return "A servlet that knows the name of the person to whom it's " + "saying hello";
}
}
Any ideas?

