資源簡介

代碼片段和文件信息
package?action;
import?java.io.IOException;
import?java.sql.ResultSet;
import?java.util.ArrayList;
import?java.util.List;
import?javax.servlet.RequestDispatcher;
import?javax.servlet.ServletConfig;
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?orm.Ttea;
import?dao.DB;
public?class?tea_servlet?extends?HttpServlet
{
public?void?service(HttpServletRequest?reqHttpServletResponse?res)throws?ServletException?IOException?
{
????????String?type=req.getParameter(“type“);
????????if(type.endsWith(“teaAdd“))
{
teaAdd(req?res);
}
????????if(type.endsWith(“teaMana“))
{
teaMana(req?res);
}
if(type.endsWith(“teaDel“))
{
teaDel(req?res);
}
}
public?void?teaAdd(HttpServletRequest?reqHttpServletResponse?res)
{
int?yuanxi_id=Integer.parseInt(req.getParameter(“yuanxi_id“));
String?bianhao=req.getParameter(“bianhao“);
String?name=req.getParameter(“name“);
String?sex=req.getParameter(“sex“);
String?age=req.getParameter(“age“);
String?chusheng=req.getParameter(“chusheng“);
String?gongzuoshi=req.getParameter(“gongzuoshi“);
String?loginpw=req.getParameter(“l(fā)oginpw“);
String?del=“no“;
String?sql=“insert?into?t_tea?values(?????????)“;
object[]?params={yuanxi_idbianhaonamesexagechushenggongzuoshiloginpwdel};
DB?mydb=new?DB();
mydb.doPstm(sql?params);
mydb.closed();
req.setAttribute(“msg“?“信息添加完畢“);
????????String?targetURL?=?“/common/msg.jsp“;
dispatch(targetURL?req?res);
}
public?void?teaMana(HttpServletRequest?reqHttpServletResponse?res)?throws?ServletException?IOException
{
List?teaList=new?ArrayList();
String?sql=“select?*?from?t_tea?where?del=‘no‘?order?by?yuanxi_id“;
object[]?params={};
DB?mydb=new?DB();
try
{
mydb.doPstm(sql?params);
ResultSet?rs=mydb.getRs();
while(rs.next())
{
Ttea?tea=new?Ttea();
tea.setId(rs.getInt(“id“));
tea.setYuanxi_id(rs.getInt(“yuanxi_id“));
tea.setBianhao(rs.getString(“bianhao“));
tea.setName(rs.getString(“name“));
tea.setSex(rs.getString(“sex“));
tea.setAge(rs.getString(“age“));
tea.setChusheng(rs.getString(“chusheng“));
tea.setGongzuoshi(rs.getString(“gongzuoshi“));
tea.setLoginpw(rs.getString(“l(fā)oginpw“));
tea.setDel(rs.getString(“del“));
teaList.add(tea);
????}
rs.close();
}
catch(Exception?e)
{
e.printStackTrace();
}
mydb.closed();
req.setAttribute(“teaList“?teaList);
req.getRequestDispatcher(“admin/tea/teaMana.jsp“).forward(req?res);
}
public?void?teaDel(HttpServletRequest?reqHttpServletResponse?res)
{
String?sql=“update?t_tea?set?del=‘yes‘?where?id=“+Integer.parseInt(req.getParameter(“id“));
object[]?para
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件????1685089??2014-03-14?11:59??JAVA?JSP005高??蒲泄芾硐到y(tǒng)\JSP高校科研管理系統(tǒng)錄像.exe
?????文件???????1632??2013-12-27?13:05??JAVA?JSP005高校科研管理系統(tǒng)\keyan\.classpath
?????文件????????552??2013-12-27?13:11??JAVA?JSP005高??蒲泄芾硐到y(tǒng)\keyan\.externalToolBuilders\org.eclipse.wst.common.project.facet.core.builder?(5).launch
?????文件????????548??2013-12-27?13:11??JAVA?JSP005高校科研管理系統(tǒng)\keyan\.externalToolBuilders\org.eclipse.wst.jsdt.core.ja
?????文件????????288??2014-03-14?11:56??JAVA?JSP005高??蒲泄芾硐到y(tǒng)\keyan\.myme
?????文件???????2218??2014-02-21?10:47??JAVA?JSP005高??蒲泄芾硐到y(tǒng)\keyan\.project
?????文件????????500??2013-12-27?13:05??JAVA?JSP005高??蒲泄芾硐到y(tǒng)\keyan\.settings\.jsdtscope
?????文件?????????99??2013-12-27?14:18??JAVA?JSP005高??蒲泄芾硐到y(tǒng)\keyan\.settings\org.eclipse.core.resources.prefs
?????文件????????629??2013-12-27?13:11??JAVA?JSP005高??蒲泄芾硐到y(tǒng)\keyan\.settings\org.eclipse.jdt.core.prefs
?????文件????????450??2013-12-27?13:05??JAVA?JSP005高校科研管理系統(tǒng)\keyan\.settings\org.eclipse.wst.common.component
?????文件????????252??2013-12-27?13:06??JAVA?JSP005高校科研管理系統(tǒng)\keyan\.settings\org.eclipse.wst.common.project.facet.core.xm
?????文件?????????49??2013-12-27?13:05??JAVA?JSP005高??蒲泄芾硐到y(tǒng)\keyan\.settings\org.eclipse.wst.jsdt.ui.superType.container
?????文件??????????6??2013-12-27?13:05??JAVA?JSP005高??蒲泄芾硐到y(tǒng)\keyan\.settings\org.eclipse.wst.jsdt.ui.superType.name
?????文件???????3780??2014-02-21?11:47??JAVA?JSP005高校科研管理系統(tǒng)\keyan\src\action\tea_servlet.java
?????文件???????2142??2017-04-04?11:09??JAVA?JSP005高校科研管理系統(tǒng)\keyan\src\dao\DB.java
?????文件????????520??2013-12-27?13:04??JAVA?JSP005高校科研管理系統(tǒng)\keyan\src\orm\TAdmin.java
?????文件???????1445??2014-03-02?21:54??JAVA?JSP005高??蒲泄芾硐到y(tǒng)\keyan\src\orm\Tzhuanli.java
?????文件???????1357??2014-02-22?16:33??JAVA?JSP005高??蒲泄芾硐到y(tǒng)\keyan\src\service\liuService.java
?????文件??????????0??2013-12-27?13:04??JAVA?JSP005高校科研管理系統(tǒng)\keyan\WebRoot\admin\index\sysPro.jsp
?????文件?????????61??2014-02-27?17:03??JAVA?JSP005高校科研管理系統(tǒng)\keyan\WebRoot\admin\index.jsp
?????文件?????????88??2013-03-29?12:10??JAVA?JSP005高校科研管理系統(tǒng)\keyan\WebRoot\admin\login.jsp
?????文件??????11657??2014-03-09?13:14??JAVA?JSP005高校科研管理系統(tǒng)\keyan\WebRoot\admin\menu.jsp
?????文件????????194??2013-12-27?13:04??JAVA?JSP005高??蒲泄芾硐到y(tǒng)\keyan\WebRoot\admin\right.jsp
?????文件???????1391??2014-02-21?10:58??JAVA?JSP005高??蒲泄芾硐到y(tǒng)\keyan\WebRoot\admin\top.jsp
?????文件???????3753??2014-02-21?10:59??JAVA?JSP005高??蒲泄芾硐到y(tǒng)\keyan\WebRoot\admin\userinfo\userPw.jsp
?????文件????????850??2014-02-21?11:11??JAVA?JSP005高??蒲泄芾硐到y(tǒng)\keyan\WebRoot\common\msg.jsp
?????文件????????797??2013-12-27?13:04??JAVA?JSP005高??蒲泄芾硐到y(tǒng)\keyan\WebRoot\common\success.jsp
?????文件???????5008??2013-12-27?13:04??JAVA?JSP005高校科研管理系統(tǒng)\keyan\WebRoot\css\ba
?????文件???????4817??2013-12-27?13:24??JAVA?JSP005高校科研管理系統(tǒng)\keyan\WebRoot\css\templatemo_st
?????文件???????1125??2013-12-27?13:04??JAVA?JSP005高??蒲泄芾硐到y(tǒng)\keyan\WebRoot\images\111.jpg
............此處省略97個文件信息
評論
共有 條評論