资源简介
基于web的二手交易系统的设计与实现,工程,数据库文件,直接运行
代码片段和文件信息
package control;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import jxl.Cell;
import jxl.Sheet;
import jxl.Workbook;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileUpload;
import org.apache.commons.fileupload.RequestContext;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
import org.apache.commons.fileupload.servlet.ServletRequestContext;
import util.Info;
import dao.CommDAO;
public class MainCtrl extends HttpServlet {
public MainCtrl() {
super();
}
public void destroy() {
super.destroy(); // Just puts “destroy“ string in log
// Put your code here
}
public void doGet(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
this.doPost(request response);
}
public void go(String urlHttpServletRequest request HttpServletResponse response)
{
try {
request.getRequestDispatcher(url).forward(request response);
} catch (ServletException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
public void gor(String urlHttpServletRequest request HttpServletResponse response)
{
try {
response.sendRedirect(url);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public void doPost(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
response.setContentType(“text/html“);
PrintWriter out = response.getWriter();
HttpSession session = request.getSession();
HashMap user = (HashMap)session.getAttribute(“admin“);
String ac = request.getParameter(“ac“);
if(ac==null)ac=““;
CommDAO dao = new CommDAO();
String date = Info.getDateStr();
String today = date.substring(010);
String tomonth = date.substring(07);
if(ac.equals(“login“))
{
String pagerandom = request.getParameter(“pagerandom“)==null?““:request.getParameter(“pagerandom“);
String random = (String)request.getSession().getAttribute(“random“);
//if(!pagerandom.equals(random)&&request.getParameter(“a“)!=null)
//{
// request.setAttribute(“random“ ““);
// go(“/admin/login.jsp“ request response);
//}
//else{
String username = request.getParameter(“uname“);
St
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-10-10 18:17 LiQing\
文件 1236 2017-09-30 16:47 LiQing\.classpath
目录 0 2017-01-08 20:40 LiQing\.myeclipse\
文件 295 2017-10-10 18:40 LiQing\.myme
文件 1750 2017-09-30 16:47 LiQing\.project
目录 0 2017-09-30 16:47 LiQing\.settings\
文件 500 2017-09-30 16:47 LiQing\.settings\.jsdtscope
文件 1040 2011-03-04 19:15 LiQing\.settings\com.genuitec.eclipse.j2eedt.core.prefs
文件 88 2015-03-25 12:02 LiQing\.settings\org.eclipse.core.resources.prefs
文件 364 2017-09-30 16:47 LiQing\.settings\org.eclipse.jdt.core.prefs
文件 459 2017-09-30 16:47 LiQing\.settings\org.eclipse.wst.common.component
文件 252 2017-09-30 16:47 LiQing\.settings\org.eclipse.wst.common.project.facet.core.xm
文件 49 2017-09-30 16:47 LiQing\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2017-09-30 16:47 LiQing\.settings\org.eclipse.wst.jsdt.ui.superType.name
目录 0 2017-09-30 16:46 LiQing\src\
目录 0 2017-10-10 13:58 LiQing\src\control\
文件 16773 2017-10-10 17:08 LiQing\src\control\MainCtrl.java
文件 2924 2017-10-10 15:50 LiQing\src\control\Message.java
文件 612 2011-02-11 10:44 LiQing\src\control\Test.java
文件 4122 2011-02-12 13:32 LiQing\src\control\Upload.java
目录 0 2017-09-30 16:46 LiQing\src\dao\
文件 17405 2017-10-10 10:04 LiQing\src\dao\CommDAO.java
文件 406 2013-04-20 10:17 LiQing\src\dbconnection.properties
目录 0 2017-09-30 16:46 LiQing\src\util\
文件 23974 2013-04-20 14:47 LiQing\src\util\Info.java
文件 7139 2012-11-13 13:07 LiQing\src\util\PageManager.java
文件 1692 2012-11-22 16:59 LiQing\src\util\SetChar.java
文件 3461 2013-02-08 17:35 LiQing\src\util\StrUtil.java
目录 0 2017-10-10 16:16 LiQing\WebRoot\
目录 0 2017-10-10 16:17 LiQing\WebRoot\admin\
文件 5048 2013-04-20 10:17 LiQing\WebRoot\admin\addmixinfof.jsp
............此处省略1224个文件信息
评论
共有 条评论