資源簡介
個人信息管理系統(畢業設計) 一份很好的畢業設計
代碼片段和文件信息
package?com.yuki.actions;
import?java.io.File;
import?java.io.IOException;
import?java.util.ArrayList;
import?java.util.List;
import?javax.servlet.http.HttpServletRequest;
import?org.apache.struts2.interceptor.ServletRequestAware;
import?com.opensymphony.xwork2.ActionSupport;
import?com.yuki.domains.Image;
import?com.yuki.util.FileBean;
import?com.yuki.util.FileUpload;
import?com.yuki.util.PageBean;
public?abstract?class?AbstractAction?extends?ActionSupport?implements?ServletRequestAware?{
public?HttpServletRequest?request;
protected?String?message;
protected?String?navigation;
protected?List?imageList?=?new?ArrayList();
protected?PageBean?pagebean?=?new?PageBean();
public?void?setRequest(HttpServletRequest?arg0)?{
request?=?arg0;
}
public?void?setServletRequest(HttpServletRequest?arg0)?{
request?=?arg0;
}
public?String?getMessage()?{
return?message;
}
public?String?getNavigation()?{
return?navigation;
}
public?HttpServletRequest?getRequest()?{
return?request;
}
public?PageBean?getPagebean()?{
return?pagebean;
}
public?void?setPagebean(PageBean?pagebean)?{
this.pagebean?=?pagebean;
}
/**
?*?刪除文件
?*?@return
?*/
protected?boolean?deleteFile(object?fileName){
return?FileUpload.delete(fileName);
}
protected?boolean?deleteFile(List?listString?path){
boolean?flag?=?true;
for(String?str?:?list){
if(!this.deleteFile(path?+?str)){
flag?=?false;
}
}
return?flag;
}
/**
?*?
?*?@param?fileName
?*?@param?path
?*?@return
?*/
protected?boolean?deleteFile(String?fileNameString?path){
// String?extendName?=?fileName.substring(fileName.lastIndexOf(“.“)?+?1);
// String?sourctName?=?fileName.substring(0fileName.lastIndexOf(“_“))?+?“.“?+?extendName;
// String?replaceStr?=?extendName.toLowerCase()?+?““?+?sourctName?+?““?+?fileName?+?““;
File?file?=?new?File(path?+?fileName);
if?(file.isFile())?{
FileUpload.delete(file);
}else{
message?=?“刪除文件不存在。“;
return?false;
}
return?true;
}
/**
?*?刪除文件時,把數據庫中的保存的文件名的部分字體貼給替換掉
?*?數據庫保存的文件以?擴展名,原文件名,保存文件名,?形式
?*?@param?saveField?數據庫中的保存的文件名(全部)
?*?@param?fileName??要刪除的文件名
?*?@return
?*/
protected?String?replaceDeleteFileField(String?saveFieldString?fileName){
String[]?fileArray?=?saveField.split(““);
StringBuilder?sbd?=?null;
String?extendsName?=?fileName.substring(fileName.lastIndexOf(“.“)?+?1).toLowerCase();
for(int?i=0;i if(i%3?==?2?&&?fileName.equals(fileArray[i])?&&?fileArray[i-2].equals(extendsName)){
sbd?=?new?StringBuilder();
sbd.append(extendsName?+?““);
sbd.append(fileArray[i-1]?+?““);
sbd.append(fileName?+?““);
break;
}
}
if(sbd?!=?null){
return?saveField.replace(sbd?““);
}
return?saveField;
}
/**
?*?處理上傳文件的方法調用?FileUpload.saveFile(request?fBean)?上傳文件
?*?@param?request
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1393??2009-11-25?15:29??個人信息管理系統\CEOBBS_SQL.txt
?????文件???????1224??2009-10-18?23:20??個人信息管理系統\CEOBBS\.project
?????文件????????291??2009-10-18?22:35??個人信息管理系統\CEOBBS\.myme
?????文件???????3119??2009-11-13?17:38??個人信息管理系統\CEOBBS\.classpath
?????文件???????1393??2009-11-25?15:29??個人信息管理系統\CEOBBS\CEOBBS_SQL.txt
?????文件???????5415??2009-11-24?18:33??個人信息管理系統\CEOBBS\WebRoot\index.jsp
?????文件???????6092??2009-11-21?23:09??個人信息管理系統\CEOBBS\WebRoot\list-topic.jsp
?????文件??????12767??2009-11-23?17:06??個人信息管理系統\CEOBBS\WebRoot\list-reply.jsp
?????文件????????768??2009-11-11?17:20??個人信息管理系統\CEOBBS\WebRoot\new-piece.jsp
?????文件???????2716??2009-11-17?18:59??個人信息管理系統\CEOBBS\WebRoot\new-topic.jsp
?????文件????????925??2009-11-11?17:44??個人信息管理系統\CEOBBS\WebRoot\new-reply.jsp
?????文件????????807??2009-11-11?17:34??個人信息管理系統\CEOBBS\WebRoot\edit-piece.jsp
?????文件???????2692??2009-11-17?23:48??個人信息管理系統\CEOBBS\WebRoot\edit-topic.jsp
?????文件???????3679??2009-11-15?22:08??個人信息管理系統\CEOBBS\WebRoot\edit-reply.jsp
?????文件????????608??2009-11-11?17:27??個人信息管理系統\CEOBBS\WebRoot\success.jsp
?????文件????????601??2009-11-11?17:28??個人信息管理系統\CEOBBS\WebRoot\error.jsp
?????文件???????1769??2009-10-21?11:50??個人信息管理系統\CEOBBS\WebRoot\example.html
?????文件??????47542??2009-10-21?15:48??個人信息管理系統\CEOBBS\WebRoot\editor.js
?????文件???????2034??2009-10-21?12:44??個人信息管理系統\CEOBBS\WebRoot\new-example.jsp
?????文件???????2322??2009-11-24?18:59??個人信息管理系統\CEOBBS\WebRoot\list-piece.jsp
?????文件???????2190??2009-11-23?16:02??個人信息管理系統\CEOBBS\WebRoot\list-search.jsp
?????文件???????2706??2009-11-17?18:58??個人信息管理系統\CEOBBS\WebRoot\search.jsp
?????文件???????3718??2009-10-24?21:34??個人信息管理系統\CEOBBS\WebRoot\ui.tabs.css
?????文件???????2530??2009-10-24?21:34??個人信息管理系統\CEOBBS\WebRoot\loading.gif
?????文件???????6511??2009-10-24?21:34??個人信息管理系統\CEOBBS\WebRoot\ui.tabs.pack.js
?????文件????????734??2009-10-24?21:34??個人信息管理系統\CEOBBS\WebRoot\tab.png
?????文件??????29846??2009-10-24?21:34??個人信息管理系統\CEOBBS\WebRoot\jquery-1.2.3.pack.js
?????文件???????5193??2009-11-23?16:03??個人信息管理系統\CEOBBS\WebRoot\list-search-reply.jsp
?????文件???????3032??2009-11-16?21:15??個人信息管理系統\CEOBBS\WebRoot\test.jsp
?????文件???????3568??2009-11-23?16:50??個人信息管理系統\CEOBBS\WebRoot\top.jsp
............此處省略1224個文件信息
- 上一篇:高級ASIC芯片綜合第二版.pdf
- 下一篇:最優化理論與算法-陳寶林.pdf
評論
共有 條評論