资源简介
学生身体体质信息管理系统[JSP+Servlet+JavaBean+JDBC(SqlServer2008R2)]
代码片段和文件信息
package Controller_Servlet;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Statement;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import model_Db.DBConnection;
import model_Db.DbUtil;
public class del_servlet extends HttpServlet {
/**
* Constructor of the object.
*/
public del_servlet() {
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 Servlet tle>“);
out.println(“ “);
out.print(“ This is “);
out.print(this.getClass());
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 {
PrintWriter out = response.getWriter();
DBConnection dbc=new DBConnection();
Connection conn=dbc.getDBconnection();
request.setCharacterEncoding(“GB2312“);//设置字符编码,避免出现乱码
response.setContentType(“text/html;charset=gb2312“);
String name=request.getParameter(“name“);
String sex=request.getParameter(“sex“);
String ww1=request.getParameter(“w1“);
String ww2=request.getParameter(“w2“);
String s=“1=1 “;
if(!name.equals(““)) s=s+“ and name=‘“+name+“‘“;
if(sex!=null) s=s+“ and sex=‘“+sex+“‘“;
float w1w2;
if(!ww1.equals(““)) {
w1=Float.parseFloat(ww1);
s=s+“and weight>=“+w1;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 600 2016-11-08 13:34 ch07_10\.classpath
文件 294 2016-11-08 18:10 ch07_10\.myme
文件 1750 2016-11-08 09:21 ch07_10\.project
文件 500 2016-11-08 09:21 ch07_10\.settings\.jsdtscope
文件 395 2016-11-08 09:21 ch07_10\.settings\org.eclipse.jdt.core.prefs
文件 459 2016-11-08 09:21 ch07_10\.settings\org.eclipse.wst.common.component
文件 252 2016-11-08 09:21 ch07_10\.settings\org.eclipse.wst.common.project.facet.core.xm
文件 49 2016-11-08 09:21 ch07_10\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2016-11-08 09:21 ch07_10\.settings\org.eclipse.wst.jsdt.ui.superType.name
文件 3920 2016-11-09 09:14 ch07_10\src\Controller_Servlet\del_servlet.java
文件 2244 2016-11-09 11:43 ch07_10\src\Controller_Servlet\findForUpdate.java
文件 3332 2016-11-09 11:38 ch07_10\src\Controller_Servlet\FindTJ_Servlet.java
文件 2205 2016-11-08 18:46 ch07_10\src\Controller_Servlet\Find_Servlet.java
文件 1500 2016-11-08 09:34 ch07_10\src\Controller_Servlet\insert.java
文件 1194 2016-11-08 14:37 ch07_10\src\model_Db\DBConnection.java
文件 1252 2016-11-08 20:04 ch07_10\src\model_Db\DbUtil.java
文件 3145728 2016-11-09 17:16 ch07_10\students.mdf
文件 1048576 2016-11-09 17:16 ch07_10\students_log.ldf
文件 875 2016-11-08 18:36 ch07_10\WebRoot\delete_stu_tijiao.jsp
文件 1832 2016-11-09 11:43 ch07_10\WebRoot\findForUpdate.jsp
文件 1471 2016-11-08 13:12 ch07_10\WebRoot\find_stu_all_1.jsp
文件 1223 2016-11-08 11:28 ch07_10\WebRoot\find_stu_tijiao.jsp
文件 453 2014-09-13 23:01 ch07_10\WebRoot\index_stu.jsp
文件 628 2016-11-08 10:07 ch07_10\WebRoot\index_stu_left.jsp
文件 149 2014-09-21 10:44 ch07_10\WebRoot\index_stu_right.jsp
文件 291 2016-11-09 10:53 ch07_10\WebRoot\index_stu_ti
文件 1286 2014-09-13 23:01 ch07_10\WebRoot\insert_stu_tijiao.jsp
文件 39 2014-09-13 23:01 ch07_10\WebRoot\me
文件 3597 2016-11-09 11:53 ch07_10\WebRoot\update_stu_edit.jsp
文件 1138 2016-11-09 11:43 ch07_10\WebRoot\update_stu_tijiao.jsp
............此处省略26个文件信息
相关资源
- 亲自打的servlet+jsp+2008sqlserver的投票系
- 基于jsp的留言板课程设计
- JSP毕业论文英文文献和翻译
- JSP + Servlet 实现 网络相册 源代码
- 网上书店 jsp 完整供参考
- jsp导航条 下拉菜单
- 企业论坛系统 jsp + servlet
- jsp个人信息管理系统
- 企业商品销售管理系统jsp+java+sql
- commons-fileupload-1.2.1.jar与commons-io-1.3.
- 购物车jsp+sql server
- jsp登录页面代码jsp登录页面代码
- j2ee课程设计小项目jsp+servlet+javaBean+
- MyEclipse+Servlet+Jsp+MySql+Tomcat实现简单订
- 学生成绩管理系统 jsp+sqlserver源码
- 图书管理系统 jsp+mysql 毕业设计
- java 项目 电子卡充值系统jsp + javabea
- 在线财务管理系统(含jsp源码)
- jsp_html_web_实现页面跳转
- 学习JAVA Web的过程和方法
- 学生信息管理系统(JSP源码)
- jsp邮箱系统,实现了收邮件和发送附
- 分页显示java+jsp+eclipse+tomcat
- 通讯录web版
- Spring Cloud Consul服务消费方集成JSP和
- 一个基于JSP的人力资源管理系统
- 用jsp+servlet+EL表达式+JSTL写的分页代码
- jsp+myeclipse+mysql员工管理系统
- jsp+sql简单购物车
- 基于JSP+Servlet+JavaBean+Dao开发模式——
评论
共有 条评论