• 大小: 9.06MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-08
  • 语言: 其他
  • 标签: 网上商城  

资源简介

开发商城的代码例子,界面美观.功能全面,可以用来作为开发的范例.

资源截图

代码片段和文件信息

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
}

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件    4825925  2012-05-17 19:13  Shopping\Shopping.rar

     文件        753  2008-11-25 23:00  Shopping\Shopping1\.classpath

     文件        297  2008-11-25 23:00  Shopping\Shopping1\.mymetadata

     文件       1226  2007-09-18 10:26  Shopping\Shopping1\.project

     文件       1029  2007-09-19 12:03  Shopping\Shopping1\SQL\Shopping.sql

     文件       1748  2007-09-18 10:26  Shopping\Shopping1\src\com\bjsxt\shopping\category\Category.java

     文件       6286  2007-09-18 15:06  Shopping\Shopping1\src\com\bjsxt\shopping\category\CategoryService.java

     文件        112  2007-09-18 10:26  Shopping\Shopping1\src\com\bjsxt\shopping\category\GradeOutOfBoundsException.java

     文件       1118  2007-09-18 10:26  Shopping\Shopping1\src\com\bjsxt\shopping\client\Cart.java

     文件        410  2007-09-18 10:26  Shopping\Shopping1\src\com\bjsxt\shopping\client\CartItem.java

     文件        627  2007-09-18 10:26  Shopping\Shopping1\src\com\bjsxt\shopping\order\OrderDAO.java

     文件        993  2007-09-18 10:26  Shopping\Shopping1\src\com\bjsxt\shopping\order\OrderMgr.java

     文件       7338  2007-09-18 10:26  Shopping\Shopping1\src\com\bjsxt\shopping\order\OrderMySQLDAO.java

     文件        823  2007-09-18 10:26  Shopping\Shopping1\src\com\bjsxt\shopping\order\SalesItem.java

     文件       1079  2007-09-18 10:26  Shopping\Shopping1\src\com\bjsxt\shopping\order\SalesOrder.java

     文件       1441  2007-09-18 10:26  Shopping\Shopping1\src\com\bjsxt\shopping\product\Product.java

     文件       1061  2007-09-18 16:20  Shopping\Shopping1\src\com\bjsxt\shopping\product\ProductDAO.java

     文件       3093  2007-09-18 10:26  Shopping\Shopping1\src\com\bjsxt\shopping\product\ProductMgr.java

     文件       7888  2007-09-18 10:26  Shopping\Shopping1\src\com\bjsxt\shopping\product\ProductMySQLDAO.java

     文件        939  2007-09-18 10:26  Shopping\Shopping1\src\com\bjsxt\shopping\product\ProductOracleDAO.java

     文件       1844  2007-09-19 11:02  Shopping\Shopping1\src\com\bjsxt\shopping\product\ProductSearchFormBean.java

     文件        631  2007-09-18 10:26  Shopping\Shopping1\src\com\bjsxt\shopping\stat\ProductStatItem.java

     文件       2198  2007-09-18 10:26  Shopping\Shopping1\src\com\bjsxt\shopping\stat\SalesCountServlet.java

     文件       1176  2007-09-18 10:26  Shopping\Shopping1\src\com\bjsxt\shopping\stat\StatService.java

     文件        357  2007-09-18 10:26  Shopping\Shopping1\src\com\bjsxt\shopping\tag\HelloWorldTag.java

     文件       2440  2007-09-18 10:26  Shopping\Shopping1\src\com\bjsxt\shopping\test\BarChartDemo.java

     文件        191  2007-09-18 10:26  Shopping\Shopping1\src\com\bjsxt\shopping\user\PasswordNotCorrectException.java

     文件       6691  2007-09-18 10:26  Shopping\Shopping1\src\com\bjsxt\shopping\user\User.java

     文件        179  2007-09-18 10:26  Shopping\Shopping1\src\com\bjsxt\shopping\user\UserNotFoundException.java

     文件       2477  2007-09-18 10:26  Shopping\Shopping1\src\com\bjsxt\shopping\util\DB.java

............此处省略746个文件信息

评论

共有 条评论