首页 > 代码库 > 最简单却最关键

最简单却最关键

package xby;

import java.io.*;
import javax.servlet.*;

public class firstservlet extends GenericServlet{
 public void service(ServletRequest req,ServletResponse res)throws ServletException, java.io.IOException
 {
  OutputStream out= res.getOutputStream();
  out.write("Hello Servlet".getBytes());
 }
}

set classpath=%classpath%;C:\apache-tomcat-7.0.55\lib

javac -d . firstservlet.java

最简单却最关键