【Java开源代码栏目提醒】:网学会员--在 Java开源代码编辑为广大网友搜集整理了:ToModifyUserAction.java绩等信息,祝愿广大网友取得需要的信息,参考学习。
package com.stsc.archive.manage;
import javax.servlet.http.*;
import org.apache.struts.action.*;
import java.util.Properties;
import com.stsc.util.STPoolDataSet;
import com.stsc.util.STResultSet;
import org.apache.struts.util.MessageResources;
/*
The action for the creation of a book.
@author 3710167@qq.com
*/
public final class ToModifyUserAction extends Action
{
public ActionForward perform(ActionMapping mapping,
ActionForm form, HttpServletRequest req,
HttpServletResponse res)
{
String enterName = req.getParameter("enterName");
System.out.println(enterName);
Properties dbBase = new Properties();
dbBase.setProperty("dsJndiName", Constants.ARCHIVE_DBSOURCE_KEY);
STPoolDataSet data = new STPoolDataSet();
String sql = "SELECT * FROM fUserName WHERE EnterName='" + enterName + "'";
STResultSet rs = data.getSTResult(
sql, dbBase);
if(rs!=null && rs.next())
{
ModifyUserForm userform = (ModifyUserForm)form;
userform.setEnterName(enterName);
userform.setRowsPerPage(rs.getInt("RowsPerPage"));
userform.setUserName(rs.getString("UserName"));System.out.println(rs.getString("UserName"));
userform.setDepart(rs.getString("Department"));
}
else
{
System.out.println("超时出错");
}
// Save our logged-in user in the session
// HttpSession session = req.getSession();
// session.setAttribute(Constants.USER_MANAGE_KEY, userList);
//========================================
return mapping.findForward("success");
}
}