资源简介
刚完成的项目,内附有现成的代码和数据库,下载即可用。

代码片段和文件信息
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 2019-01-12 11:10 s2\
文件 6148 2019-01-12 11:10 s2\.DS_Store
目录 0 2019-01-12 11:11 __MACOSX\
目录 0 2019-01-12 11:11 __MACOSX\s2\
文件 120 2019-01-12 11:10 __MACOSX\s2\._.DS_Store
目录 0 2012-11-19 20:42 s2\WebRoot\
文件 712 2012-11-19 08:27 s2\WebRoot\left.jsp
目录 0 2019-01-12 11:11 __MACOSX\s2\WebRoot\
文件 172 2012-11-19 08:27 __MACOSX\s2\WebRoot\._left.jsp
文件 807 2012-11-19 08:27 s2\WebRoot\mainfr
文件 172 2012-11-19 08:27 __MACOSX\s2\WebRoot\._mainfr
文件 1467 2012-11-19 08:27 s2\WebRoot\request.jsp
文件 172 2012-11-19 08:27 __MACOSX\s2\WebRoot\._request.jsp
文件 1130 2012-11-19 08:27 s2\WebRoot\top.jsp
文件 172 2012-11-19 08:27 __MACOSX\s2\WebRoot\._top.jsp
文件 575 2012-11-19 08:27 s2\WebRoot\error.jsp
文件 172 2012-11-19 08:27 __MACOSX\s2\WebRoot\._error.jsp
文件 1401 2012-11-19 08:27 s2\WebRoot\liu.jsp
文件 172 2012-11-19 08:27 __MACOSX\s2\WebRoot\._liu.jsp
目录 0 2012-11-19 20:14 s2\WebRoot\file\
文件 285 2012-11-19 08:27 s2\WebRoot\file\agreement.txt
目录 0 2019-01-12 11:11 __MACOSX\s2\WebRoot\file\
文件 172 2012-11-19 08:27 __MACOSX\s2\WebRoot\file\._agreement.txt
文件 172 2012-11-19 20:14 __MACOSX\s2\WebRoot\._file
文件 3487 2012-11-19 08:27 s2\WebRoot\yonghu.jsp
文件 172 2012-11-19 08:27 __MACOSX\s2\WebRoot\._yonghu.jsp
文件 1135 2012-11-19 08:27 s2\WebRoot\response1.jsp
文件 172 2012-11-19 08:27 __MACOSX\s2\WebRoot\._response1.jsp
目录 0 2013-01-11 21:29 s2\WebRoot\chart\
文件 172 2013-01-11 21:29 __MACOSX\s2\WebRoot\._chart
文件 2972 2012-11-19 08:27 s2\WebRoot\userupd.jsp
............此处省略150个文件信息
- 上一篇:图书管理信息系统毕业设计源代码
- 下一篇:银行各功能实现 登录 转账 增删改查员工
相关资源
- 微博系统(Java源码,servlet+jsp),适
- 美食天下项目Android版源码和Web版源码
- JSP企业人事管理系统设计(源代码+论
- java代码编写将excel数据导入到mysql数据
- 实现一个图书管理系统
- JAVA JSP公司财务管理系统 源代码 论文
- JSP+MYSQL旅行社管理信息系统
- JSP,SQL,MVC的选课系统
- 基于JSP的学生宿舍管理系统(源码 数
- JSP选课管理系统
- mysql jsp网站源码下载
- JSP做的化妆品商城
- Jsp购物车实例
- 基于JSP的校友信息管理系统(添加数
- 基于jsp的bbs论坛 非常详细
- jsp oracle通讯录
- JSP学生信息管理系统 Mysql数据库
- 使用jsp servlet做的投票系统
- android通过JDBC连接Mysql数据库
- JSP登陆验证 实现JSP用户名 密码 验
- jsp基于servlet 图书馆管理系统
- jsp学生成绩管理系统.rar
- 在线考试系统源代码(jsp)
- 超级好的纯jsp写的聊天室
- JSP 网上购物网页项目
- JSP+mysql新闻发布系统.rar
- jsp 学生信息管理系统设计与实现
- jsp与SQL Server数据库实现的客户注册登
- 简易教学管理系统(jsp spring struts h
- 学生信息管理系统 JSP MySQL
评论
共有 条评论