From c67252ac149e7899c01cd4a013bd9e32f922af90 Mon Sep 17 00:00:00 2001 From: ChowWd <1297422578@qq.com> Date: Thu, 20 Oct 2016 23:28:06 +0800 Subject: [PATCH] =?UTF-8?q?#4=20=E6=8F=90=E4=BA=A4=E5=AE=9E=E9=AA=8C?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Se1414080902221Servlet.java | 28 +++++++++++ jweb/web/1414080902221/index.jsp | 50 +++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 jweb/src/edu/hzu/javaweb/labs/se1414080902221/Se1414080902221Servlet.java create mode 100644 jweb/web/1414080902221/index.jsp diff --git a/jweb/src/edu/hzu/javaweb/labs/se1414080902221/Se1414080902221Servlet.java b/jweb/src/edu/hzu/javaweb/labs/se1414080902221/Se1414080902221Servlet.java new file mode 100644 index 00000000..adca6499 --- /dev/null +++ b/jweb/src/edu/hzu/javaweb/labs/se1414080902221/Se1414080902221Servlet.java @@ -0,0 +1,28 @@ +package edu.hzu.javaweb.labs.se1414080902221; + +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; +//import javax.xml.ws.WebServiceRefs; +@WebServlet("/1414080902221") +public class Se1414080902221Servlet extends HttpServlet { + + public void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + doPost(request,response); + } + + public void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + response.setContentType("text/html"); + PrintWriter out = response.getWriter(); + out.println("Success"); + } + +} diff --git a/jweb/web/1414080902221/index.jsp b/jweb/web/1414080902221/index.jsp new file mode 100644 index 00000000..d90e713e --- /dev/null +++ b/jweb/web/1414080902221/index.jsp @@ -0,0 +1,50 @@ +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + + + 提交 + + + + + + + + + + <%= new java.util.Date() %> +
+
+ + +
+
+ + +
+ +
+ + + + +