资源简介
用户管理系统JSP+MYSQL.zip
代码片段和文件信息
package c;
import c.DBConn;
import c.UserDao;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.SQLException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class chart extends HttpServlet {
/**
* Constructor of the object.
*/
public chart() {
super();
}
/**
* 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 {
doPost(requestresponse);
}
/**
* 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 {
String basePath = this.getServletContext().getRealPath(“/“);
UserDao userDao = new UserDao();
Connection conn = null;
conn = DBConn.getConn();
String strFlag = request.getParameter(“flag“);
try{
if(“bar“.equals(strFlag)){
userDao.createBar(request response basePath+“chart\\chartBar.jpg“);
}else if(“pie“.equals(strFlag)){
userDao.createPie(request response basePath+“chart\\chartPie.jpg“);
}
}catch(Exception e){
e.printStackTrace();
}finally{
if(conn != null){
try {
conn.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2012-11-19 20:14 s2\
文件 693 2012-11-19 20:32 s2\.classpath
目录 0 2013-01-11 21:29 s2\.myeclipse\
文件 279 2012-11-19 20:14 s2\.myme
文件 1219 2012-11-19 08:27 s2\.project
目录 0 2012-11-19 20:14 s2\.settings\
文件 100 2012-11-19 08:27 s2\.settings\org.eclipse.core.resources.prefs
目录 0 2012-11-19 20:42 s2\WebRoot\
目录 0 2012-11-19 20:14 s2\WebRoot\me
文件 39 2012-11-19 08:27 s2\WebRoot\me
目录 0 2012-11-19 20:14 s2\WebRoot\WEB-INF\
目录 0 2012-11-19 20:46 s2\WebRoot\WEB-INF\classes\
目录 0 2012-11-19 20:46 s2\WebRoot\WEB-INF\classes\c\
文件 916 2012-11-19 20:46 s2\WebRoot\WEB-INF\classes\c\DBConn.class
文件 3411 2012-11-19 20:46 s2\WebRoot\WEB-INF\classes\c\FileServlet.class
文件 12568 2012-11-19 20:46 s2\WebRoot\WEB-INF\classes\c\UserDao.class
文件 1613 2012-11-19 20:46 s2\WebRoot\WEB-INF\classes\c\UserForm.class
文件 3234 2012-11-19 20:46 s2\WebRoot\WEB-INF\classes\c\UserOperServlet.class
文件 1827 2012-11-19 20:46 s2\WebRoot\WEB-INF\classes\c\UserServlet.class
文件 2307 2012-11-19 20:46 s2\WebRoot\WEB-INF\classes\c\chart.class
文件 4200 2012-11-19 20:46 s2\WebRoot\WEB-INF\classes\c\excel.class
目录 0 2012-11-19 20:46 s2\WebRoot\WEB-INF\classes\com\
文件 1500 2012-11-19 20:46 s2\WebRoot\WEB-INF\classes\com\Caulcate.class
文件 2811 2012-11-19 20:46 s2\WebRoot\WEB-INF\classes\com\F.class
文件 1831 2012-11-19 20:46 s2\WebRoot\WEB-INF\classes\com\King.class
文件 1717 2012-11-19 20:46 s2\WebRoot\WEB-INF\classes\com\Liu.class
文件 1532 2012-11-19 20:46 s2\WebRoot\WEB-INF\classes\com\LoginServlet.class
目录 0 2012-11-19 20:14 s2\WebRoot\WEB-INF\lib\
文件 362283 2012-11-19 10:02 s2\WebRoot\WEB-INF\lib\jcommon-0.9.7.jar
文件 962701 2012-11-19 10:02 s2\WebRoot\WEB-INF\lib\jfreechart-0.9.21.jar
文件 516481 2012-11-19 10:02 s2\WebRoot\WEB-INF\lib\jxl.jar
............此处省略50个文件信息
评论
共有 条评论