📄 filesearchaction.java
字号:
package com.stsc.archive.volumn;
import javax.servlet.http.*;
import org.apache.struts.action.*;
import java.util.Properties;
import org.apache.struts.util.MessageResources;
import com.stsc.util.STPoolDataSet;
import com.stsc.util.STResultSet;
import com.stsc.archive.file.Constants;
public final class filesearchAction extends Action
{
public ActionForward perform(ActionMapping mapping, ActionForm form,
HttpServletRequest req,HttpServletResponse res)
{
Properties dbBase= new Properties();
dbBase.setProperty("dsJndiName", Constants.ARCHIVE_DBSOURCE_KEY);
STPoolDataSet data=new STPoolDataSet();
String sql="SELECT * FROM fVolumn";
STResultSet rs=data.getSTResult(sql,dbBase);
FileKindList shore=new FileKindList();
while(rs!=null && rs.next())
{
System.out.println("进入while语句");
FileKind filename=new FileKind();
System.out.println("进入第一步");
filename.setarchivetype(rs.getString("ArchiveType"));
System.out.println(rs.getString("ArchiveType"));
filename.setvolumnno(rs.getString("VolumnNo"));
System.out.println(rs.getString("VolumnNo") );
filename.setvolumntitle(rs.getString("VolumnTitle"));
System.out.println("进入第4步");
filename.setcode(rs.getString("Code"));
System.out.println("进入第5步");
filename.setcategory(rs.getString("Category"));
System.out.println("进入第6步");
filename.setretentionperiod(rs.getString("RetentionPeriod"));
System.out.println("进入第7步");
filename.setstartdate(rs.getString("StartDate"));
System.out.println("进入第8步");
filename.setenddate(rs.getString("EndDate"));
System.out.println("进入第9步");
filename.settotalnum(rs.getString("TotalNum"));
System.out.println("进入第10步");
filename.settotalpage(rs.getString("TotalPage"));
System.out.println("进入第11步");
filename.setduty(rs.getString("Duty"));
System.out.println("进入第12步");
filename.setsecurity(rs.getString("Security"));
System.out.println("进入第13步");
filename.setarchiveunit(rs.getString("ArchiveUnit"));
System.out.println("进入第14步");
filename.setremark(rs.getString("Remark"));
System.out.println("进入第15步");
filename.setstatus(rs.getString("Status"));
System.out.println("进入第16步");
filename.setvolumnid(rs.getInt("VolumnID"));
System.out.println("进入第17步");
shore.addFileName(filename);
System.out.println("进入第18步");
}
System.out.println("出了while语句");
HttpSession session=req.getSession();
session.setAttribute("myhashtable",shore);
System.out.println("filesearchAction.java");
return mapping.findForward("success");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -