Thanks.I have installed jsdk2.0 successfully.
but when I tried the first java program like this:
public class SimpleServlet extends HttpServlet
/**
* Handle the HTTP GET method by building a simple web page.
*/
public void doGet (HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException
{
PrintWriter out;
String title = "Simple Servlet Output";
// set content type and other response header fields first
response.setContentType("text/html");
// then write the data of the response
out = response.getWriter();
out.println("<HTML><HEAD><TITLE>");
out.println(title);
out.println("</TITLE></HEAD><BODY>");
out.println("<H1>" + title + "</H1>");
out.println("<P>This is output from SimpleServlet.");
out.println("</BODY></HTML>");
out.close();
}
}
I use:
javac SimpleServlet.java
then the linux system occurs:
SimpleServlet.java:1: Superclass HttpServlet of class SimpleServlet not
found.
public class SimpleServlet extends HttpServlet
^
1 error
what shall I do?How to execute a first java servlet program?
Thanks you.
-----Original Message-----
~{7"<~HK~}: HH Khan <[EMAIL PROTECTED]>
~{JU<~HK~}: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
~{HUFZ~}: 1999~{Dj~}12~{TB~}22~{HU~} 10:51
~{VwLb~}: Re: SOS
>Lookup these sites, to begin with:
>
>http://clio.uark.edu/library/jserv1.0/docs/install/howto.unix_install.html
>
>http://www.servletcentral.com/1999-01/jserv.dchtml
>
>-khan
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html