From 3ff3491776829daffb8db469256d3e0b4cae1c06 Mon Sep 17 00:00:00 2001 From: yoxiang <18003021640@163.com> Date: Thu, 1 Dec 2016 14:48:13 +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 --- .../Se1414080902121Servlet.java | 29 +++++++++ jweb/web/1414080902121/index.jsp | 64 +++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 jweb/src/edu/hzu/javaweb/labs/se1414080902121/Se1414080902121Servlet.java create mode 100644 jweb/web/1414080902121/index.jsp diff --git a/jweb/src/edu/hzu/javaweb/labs/se1414080902121/Se1414080902121Servlet.java b/jweb/src/edu/hzu/javaweb/labs/se1414080902121/Se1414080902121Servlet.java new file mode 100644 index 00000000..36da03c4 --- /dev/null +++ b/jweb/src/edu/hzu/javaweb/labs/se1414080902121/Se1414080902121Servlet.java @@ -0,0 +1,29 @@ +package edu.hzu.javaweb.labs.se1414080902121; + +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; + +@WebServlet("/1414080902121") +public class Se1414080902121Servlet extends HttpServlet { + private static final long serialVersionUID = 1L; + + + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + + doPost(request,response); + } + + + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + + response.setContentType("text/html"); + PrintWriter out = response.getWriter(); + out.println("Sign in Successfully!"); + } + +} diff --git a/jweb/web/1414080902121/index.jsp b/jweb/web/1414080902121/index.jsp new file mode 100644 index 00000000..762013da --- /dev/null +++ b/jweb/web/1414080902121/index.jsp @@ -0,0 +1,64 @@ +<%@ page language="java" contentType="text/html; charset=utf-8" +pageEncoding="utf-8"%> + <% + String path = request.getContextPath(); + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; + %> + +
+