📄 filekindtableaction.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 filekindtableAction extends Action
{
public String Iso2Gb(String str)
{
String ret=(str==null) ? "" : str;
try
{
byte[] byteStr=str.getBytes("ISO-8859-1");
return new String(byteStr,"gb2312");
}
catch(Exception e)
{
return ret;
}
}
public ActionForward perform(ActionMapping mapping,ActionForm form,
HttpServletRequest req,HttpServletResponse res)
{
String[] enterName=req.getParameterValues("enterName");
//System.out.println(enterName);
Properties dbBase=new Properties();
dbBase.setProperty("dsJndiName", Constants.ARCHIVE_DBSOURCE_KEY);
STPoolDataSet data=new STPoolDataSet();
if(enterName!=null && enterName.length>0)
{
for(int i=0; i<enterName.length;i++)
{
String sql="DELETE * FROM fArchiveType WHERE ArchiveType='" + enterName[i] +"'";
data.executeSQL(sql,dbBase);
}
}
String sql1="SELECT * FROM fArchiveType";
STResultSet rs1=data.getSTResult(sql1,dbBase);
FileKindList shore=new FileKindList();
System.out.println("进入while之前");
while(rs1!=null && rs1.next())
{
FileKind filename=new FileKind();
filename.setFileName(rs1.getString("ArchiveType"));
System.out.println("进入while");
shore.addFileName(filename);
}
HttpSession session = req.getSession();
session.setAttribute("myhashtable", shore);
System.out.println("filekindtableAction.java 123");
return mapping.findForward("success");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -