• 大小: 4.71MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-10-03
  • 语言: Java
  • 标签: JSP  网上购物  

资源简介

JSP+MySQL+Tomcat网上购物系统 。

资源截图

代码片段和文件信息

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 TestContextParamServlet extends HttpServlet {

/**
 * Constructor of the object.
 */
public TestContextParamServlet() {
super();
}

/**
 * Destruction of the servlet. 

 */
public void destroy() {
super.destroy(); // Just puts “destroy“ string in log
// Put your code here
}

/**
 * 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“);
PrintWriter out = response.getWriter();
out
.println(““);
out.println(““);
out.println(“  tle>A Servlettle>“);
out.println(“  “);
out.print(“    This is “);
out.print(this.getClass() + this.getServletConfig().getServletContext().getInitParameter(“a“));
out.println(“ using the GET method“);
out.println(“  “);
out.println(““);
out.flush();
out.close();
}

/**
 * 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(“  tle>A Servlettle>“);
out.println(“  “);
out.print(“    This is “);
out.print(this.getClass());
out.println(“ using the POST method“);
out.println(“  “);
out.println(““);
out.flush();
out.close();
}

/**
 * Initialization of the servlet. 

 *
 * @throws ServletException if an error occure
 */
public void init() throws ServletException {
// Put your code here
}

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-12-24 13:26  Shopping\
     文件        1304  2017-12-23 12:43  Shopping\.classpath
     文件         297  2008-02-23 13:23  Shopping\.mymetadata
     文件        1618  2017-12-23 12:43  Shopping\.project
     目录           0  2017-12-23 12:43  Shopping\.settings\
     文件         564  2017-12-23 12:43  Shopping\.settings\.jsdtscope
     文件         341  2017-12-23 12:43  Shopping\.settings\com.genuitec.eclipse.migration.prefs
     文件         364  2017-12-23 12:43  Shopping\.settings\org.eclipse.jdt.core.prefs
     文件         550  2017-12-23 12:43  Shopping\.settings\org.eclipse.wst.common.component
     文件         362  2017-12-23 12:43  Shopping\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2017-12-23 12:43  Shopping\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2017-12-23 12:43  Shopping\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2017-12-23 12:34  Shopping\SQL\
     文件        1029  2007-09-19 12:03  Shopping\SQL\Shopping.sql
     目录           0  2017-12-23 12:43  Shopping\src\
     目录           0  2017-12-23 12:34  Shopping\src\com\
     目录           0  2017-12-23 12:34  Shopping\src\com\bjsxt\
     目录           0  2017-12-23 12:34  Shopping\src\com\bjsxt\shopping\
     目录           0  2017-12-23 12:34  Shopping\src\com\bjsxt\shopping\category\
     文件        1748  2007-09-18 10:26  Shopping\src\com\bjsxt\shopping\category\Category.java
     文件        6286  2007-09-18 15:06  Shopping\src\com\bjsxt\shopping\category\CategoryService.java
     文件         112  2007-09-18 10:26  Shopping\src\com\bjsxt\shopping\category\GradeOutOfBoundsException.java
     目录           0  2017-12-23 12:34  Shopping\src\com\bjsxt\shopping\client\
     文件        1118  2007-09-18 10:26  Shopping\src\com\bjsxt\shopping\client\Cart.java
     文件         410  2007-09-18 10:26  Shopping\src\com\bjsxt\shopping\client\CartItem.java
     目录           0  2017-12-23 12:34  Shopping\src\com\bjsxt\shopping\order\
     文件         627  2007-09-18 10:26  Shopping\src\com\bjsxt\shopping\order\OrderDAO.java
     文件         993  2007-09-18 10:26  Shopping\src\com\bjsxt\shopping\order\OrderMgr.java
     文件        7338  2007-09-18 10:26  Shopping\src\com\bjsxt\shopping\order\OrderMySQLDAO.java
     文件         823  2007-09-18 10:26  Shopping\src\com\bjsxt\shopping\order\SalesItem.java
     文件        1079  2007-09-18 10:26  Shopping\src\com\bjsxt\shopping\order\SalesOrder.java
............此处省略752个文件信息

评论

共有 条评论