SecondServlet.java 439 B

123456789101112131415161718
  1. package cn.hhj.bio.tomcat.servlet;
  2. import cn.hhj.bio.tomcat.http.Request;
  3. import cn.hhj.bio.tomcat.http.Response;
  4. import cn.hhj.bio.tomcat.http.Servlet;
  5. public class SecondServlet extends Servlet {
  6. public void doGet(Request request, Response response) throws Exception {
  7. this.doPost(request, response);
  8. }
  9. public void doPost(Request request, Response response) throws Exception {
  10. response.write("This is Second Serlvet");
  11. }
  12. }