package yanglingservlet;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
/**
*
Title:
*
Description:
*
Copyright: Copyright (c) 2006
*
Company:
* @author not attributable
* @version 1.0
*/
public class Servlet1 extends HttpServlet implements SingleThreadModel {
private static final String CONTENT_TYPE = "text/html; charset=GBK";
//Initialize global variables
public void init() throws ServletException {
}
//Process the HTTP Get request
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setContentType(CONTENT_TYPE);
PrintWriter out = response.getWriter();
out.println("<html>");
out.println("<head><title>Servlet1</title></head>");
out.println("<body bgcolor=\"#ffffff\">");
out.println("
The servlet has received a " + request.getMethod() + ". This is the reply.
");out.println("</body></html>");
}
//Process the HTTP Post request
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doGet(request, response);
}
//Clean up resources
public void destroy() {
}
}
the Message::
D:\JBuilderX\jdk1.4\bin\javaw -classpath "C:\Program Files\MapInfo\tomcat-4.0.1]\org\apache\catalina\startup\bin\bootstrap.jar;D:\JBuilderX\jdk1.4\lib\tools.jar" -Dcatalina.home="C:/Program Files/MapInfo/tomcat-4.0.1" org.apache.catalina.startup.Bootstrap -config "C:\Documents and Settings\Administrator\jbproject\yanglingservlet\Tomcat\conf\server8080.xml" start
java.lang.NoClassDefFoundError: org/apache/catalina/startup/Bootstrap
Exception in thread "main"