diff --git a/jweb/src/edu/hzu/javaweb/labs/se1414080902202/Se1414080902202Servlet.java b/jweb/src/edu/hzu/javaweb/labs/se1414080902202/Se1414080902202Servlet.java new file mode 100644 index 00000000..550ece1e --- /dev/null +++ b/jweb/src/edu/hzu/javaweb/labs/se1414080902202/Se1414080902202Servlet.java @@ -0,0 +1,60 @@ +package edu.hzu.javaweb.labs.se1414080902202; + +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 Se1414080902202Servlet extends HttpServlet { + + /** + * The doGet method of the servlet.
+ * + * This method is called when a form has its tag value method equals to get. + * + * @param request the request send by the client to the server + * @param response the response send by the server to the client + * @throws ServletException if an error occurred + * @throws IOException if an error occurred + */ + public void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + response.setContentType("text/html;charset=utf-8"); + PrintWriter out = response.getWriter(); + out.println("计价规则是:起步价5元,超过2公里,每公里2元,以此累加。累加金额超过50,则减少5元。"); + + } + + /** + * The doPost method of the servlet.
+ * + * This method is called when a form has its tag value method equals to post. + * + * @param request the request send by the client to the server + * @param response the response send by the server to the client + * @throws ServletException if an error occurred + * @throws IOException if an error occurred + */ + public void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + response.setContentType("text/html"); + PrintWriter out = response.getWriter(); + out.println(""); + out.println(""); + out.println(" A Servlet"); + out.println(" "); + out.print(" This is "); + out.print(this.getClass()); + out.println(", using the POST method"); + out.println(" "); + out.println(""); + out.flush(); + out.close(); + } + +} diff --git a/jweb/web/1414080902202/index.jsp b/jweb/web/1414080902202/index.jsp new file mode 100644 index 00000000..480933d8 --- /dev/null +++ b/jweb/web/1414080902202/index.jsp @@ -0,0 +1,74 @@ +<%@ page language="java" import="java.util.*" contentType="text/html;charset=utf-8"%> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + + + + + + + + + + + +鏌愭淮鍑鸿缃戙 + + + +
+

+鏌愭淮娆㈣繋鎮▇ +

+
+

鎮ㄥソ锛屾偍鐜板湪瑕佸幓鍝効锛

+ +
+

+鎮ㄦ兂鎼箻锛 +

+

+蹇溅       +鍑虹杞       +涓撹溅       +椤洪杞 +

+

+璁′环瑙勫垯 +

+
+

+ +

+
+

+绁濇偍涔樺潗鎰夊揩锛*鈥* +

+
+ + diff --git a/jweb/web/META-INF/MANIFEST.MF b/jweb/web/META-INF/MANIFEST.MF deleted file mode 100644 index 5e949512..00000000 --- a/jweb/web/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -Class-Path: -