diff --git a/jweb/src/edu/hzu/javaweb/labs/se1414080902234/se1414080902234Servlet.java b/jweb/src/edu/hzu/javaweb/labs/se1414080902234/se1414080902234Servlet.java new file mode 100644 index 00000000..8507fd69 --- /dev/null +++ b/jweb/src/edu/hzu/javaweb/labs/se1414080902234/se1414080902234Servlet.java @@ -0,0 +1,46 @@ +package edu.hzu.javaweb.labs.se1414080902234; + +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * Servlet implementation class se1414080902234Servlet + */ +@WebServlet("/1414080902234") +public class se1414080902234Servlet extends HttpServlet { + private static final long serialVersionUID = 1L; + + /** + * @see HttpServlet#HttpServlet() + */ + public se1414080902234Servlet() { + super(); + // TODO Auto-generated constructor stub + } + + /** + * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) + */ + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + // TODO Auto-generated method stub + } + + /** + * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) + */ + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + // TODO Auto-generated method stub + request.setCharacterEncoding("UTF-8"); + response.setContentType("text/html; charset=UTF-8"); + String text1=request.getParameter("search"); + PrintWriter out=response.getWriter(); + out.println("¼ìË÷µÄ¹Ø¼ü×ÖΪ£º"+text1); + + } + +} diff --git a/jweb/web/1414080902234/index.jsp b/jweb/web/1414080902234/index.jsp new file mode 100644 index 00000000..7f631e1d --- /dev/null +++ b/jweb/web/1414080902234/index.jsp @@ -0,0 +1,25 @@ +<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> + +
+ + + + + + + + + + + + + + + + + + \ No newline at end of file