My excuses for such a simple question, but the archives are not =
searchable and the documentation not very clear. Or may-be I am just a =
terrible newbee.
Say I have a class file that contains a servlet, should not I do =
something so that tomcat becomes the container of this servlet, and a =
client browser could call the servlet? I expected to find some "install =
class file that contains the servlet so Tomcat becomes it container" =
option somewhere in the management part of Tomcat, but I am lost.
These are my files:
HelloIZ.java:
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class HelloIZ extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse =
response)
throws IOException, ServletException
{
response.setContentType("text/html");
PrintWriter out =3D response.getWriter();
out.println("<html>");
out.println("<head>");
out.println("<title>Hallo IntraZis!</title>");
out.println("</head>");
out.println("<body>");
out.println("<h1>Hallo IntraZis!</h1>");
out.println("</body>");
out.println("</html>");
}
}
I have got the class file after setting my classpath to servlet.jar and =
using javac.
And I thought I had to make some html to call the servlet:
StartServlet.html
<html>
<head>
<title>Hello Hospital!</title>
</head>
<body>
<a href=3D"./HelloIZExample">go</a>
</body>=09
</html>