-
大小: 898KB文件類型: .rar金幣: 1下載: 0 次發(fā)布日期: 2021-06-07
- 語言: Java
- 標簽:
資源簡介
使用JSP作為開發(fā)語言,后臺使用SQL SERVER作為數(shù)據(jù)庫管理系統(tǒng),開發(fā)環(huán)境是MyEclipse,服務(wù)器采用tomcat
代碼片段和文件信息
package?com.action;
/**
?*??
?*?
?*/
import?java.io.IOException;
import?java.text.SimpleDateFormat;
import?java.util.Calendar;
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?com.bean.ComBean;
import?com.bean.SystemBean;
import?com.util.Constant;
import?com.util.Filter;
import?com.util.SmartFile;
import?com.util.SmartUpload;
public?class?NewsServlet?extends?HttpServlet?{
private?ServletConfig?config;
/**
?*?Constructor?of?the?object.
?*/
public?NewsServlet()?{
super();
}
final?public?void?init(ServletConfig?config)?throws?ServletException
????{
????????this.config?=?config;??
????}
????final?public?ServletConfig?getServletConfig()
????{
????????return?config;
????}
/**
?*?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?{
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?{
request.setCharacterEncoding(Constant.CHARACTERENCODING);
response.setContentType(Constant.CONTENTTYPE);
String?sysdir?=?new?SystemBean().getDir();
HttpSession?session?=?request.getSession();
ComBean?cb=new?ComBean();
?String?method?=?null;
?String?date2=new?SimpleDateFormat(“yyyy-MM-dd“).format(Calendar.getInstance().getTime());
?
?SmartUpload?mySmartUpload?=?new?SmartUpload();//init
?int?count?=?0;
?try{
?mySmartUpload.initialize(configrequestresponse);
?????????????mySmartUpload.upload();?
?????????????method?=?mySmartUpload.getRequest().getParameter(“method“).trim();
????????????if(method.equals(“addStu“)){//增加學生
???????????? String?xm?=?mySmartUpload.getRequest().getParameter(“xm“);
???????????? String?xb?=?mySmartUpload.getRequest().getParameter(“xb“);
???????????? String?nl?=?my
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????709??2012-06-05?08:17??180JSP教師工作量統(tǒng)計系統(tǒng)\jsgzl\.classpath
?????文件????????288??2012-06-10?21:36??180JSP教師工作量統(tǒng)計系統(tǒng)\jsgzl\.myme
?????文件???????1223??2012-06-02?06:33??180JSP教師工作量統(tǒng)計系統(tǒng)\jsgzl\.project
?????文件???????5889??2012-06-02?21:50??180JSP教師工作量統(tǒng)計系統(tǒng)\jsgzl\src\com\action\NewsServlet.java
?????文件???????7947??2012-06-04?20:44??180JSP教師工作量統(tǒng)計系統(tǒng)\jsgzl\src\com\bean\AdminBean.java
?????文件????????318??2012-06-07?21:20??180JSP教師工作量統(tǒng)計系統(tǒng)\jsgzl\src\com\util\CheckCode.java
?????文件???????1838??2012-06-09?15:28??180JSP教師工作量統(tǒng)計系統(tǒng)\jsgzl\src\com\util\Common.java
?????文件????????533??2012-06-06?01:26??180JSP教師工作量統(tǒng)計系統(tǒng)\jsgzl\src\com\util\Constant.java
?????文件???????2638??2012-06-02?01:05??180JSP教師工作量統(tǒng)計系統(tǒng)\jsgzl\src\com\util\DBO.java
?????文件????????650??2012-06-11?02:31??180JSP教師工作量統(tǒng)計系統(tǒng)\jsgzl\src\com\util\Filter.java
?????文件????????838??2012-06-11?00:31??180JSP教師工作量統(tǒng)計系統(tǒng)\jsgzl\WebRoot\admin\if
?????文件???????1905??2012-06-06?07:59??180JSP教師工作量統(tǒng)計系統(tǒng)\jsgzl\WebRoot\admin\if
?????文件???????1227??2012-06-06?05:18??180JSP教師工作量統(tǒng)計系統(tǒng)\jsgzl\WebRoot\admin\if
?????文件????????838??2012-06-01?15:16??180JSP教師工作量統(tǒng)計系統(tǒng)\jsgzl\WebRoot\admin\if
?????文件??????13643??2012-06-10?03:03??180JSP教師工作量統(tǒng)計系統(tǒng)\jsgzl\WebRoot\admin\if
?????文件???????1466??2012-06-03?23:38??180JSP教師工作量統(tǒng)計系統(tǒng)\jsgzl\WebRoot\admin\if
?????文件???????5514??2012-06-07?09:40??180JSP教師工作量統(tǒng)計系統(tǒng)\jsgzl\WebRoot\admin\if
?????文件??????10889??2012-06-04?20:23??180JSP教師工作量統(tǒng)計系統(tǒng)\jsgzl\WebRoot\admin\images\admin_m.swf
?????文件???????6221??2012-06-02?20:33??180JSP教師工作量統(tǒng)計系統(tǒng)\jsgzl\WebRoot\admin\images\Admin_st
?????文件????????876??2012-06-04?12:41??180JSP教師工作量統(tǒng)計系統(tǒng)\jsgzl\WebRoot\admin\images\bg.jpg
?????文件????????315??2012-06-03?01:22??180JSP教師工作量統(tǒng)計系統(tǒng)\jsgzl\WebRoot\admin\images\bt_login.gif
?????文件????????179??2012-06-01?11:36??180JSP教師工作量統(tǒng)計系統(tǒng)\jsgzl\WebRoot\admin\images\bullet.gif
?????文件??????20734??2012-06-07?13:23??180JSP教師工作量統(tǒng)計系統(tǒng)\jsgzl\WebRoot\admin\images\calendar.js
?????文件??????26508??2012-06-05?15:38??180JSP教師工作量統(tǒng)計系統(tǒng)\jsgzl\WebRoot\admin\images\Common.js
?????文件???????3143??2012-06-10?03:30??180JSP教師工作量統(tǒng)計系統(tǒng)\jsgzl\WebRoot\admin\images\date.js
?????文件????????835??2012-06-02?10:44??180JSP教師工作量統(tǒng)計系統(tǒng)\jsgzl\WebRoot\admin\images\default.jsp
?????文件????????168??2012-06-04?01:29??180JSP教師工作量統(tǒng)計系統(tǒng)\jsgzl\WebRoot\admin\images\HardWare.gif
?????文件?????????85??2012-06-03?18:28??180JSP教師工作量統(tǒng)計系統(tǒng)\jsgzl\WebRoot\admin\images\img_u.gif
?????文件????????835??2012-06-08?18:22??180JSP教師工作量統(tǒng)計系統(tǒng)\jsgzl\WebRoot\admin\images\index.jsp
?????文件?????????57??2012-06-10?11:46??180JSP教師工作量統(tǒng)計系統(tǒng)\jsgzl\WebRoot\admin\images\li
............此處省略146個文件信息
評論
共有 條評論