Jaygee
2015-09-05 11:20
package servlet;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class HelloServlet extends HttpServlet {
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
System.out.println("处理get请求。。。");
PrintWriter out = response.getWriter();
out.println("<strong>Hello Servlet</strong><br>");
}
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
}
}
还没有人回答问题,可以看看其他问题
JAVA遇见HTML——Servlet篇
160615 学习 · 1029 问题
相似问题