📄 u01d10000action.java
字号:
package cn.hope.front.action;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.log4j.Logger;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.DynaActionForm;
import cn.hope.front.bo.U01D10000bo;
import cn.hope.front.pojo.CFourm;
import cn.hope.front.pojo.CRefourm;
import cn.hope.front.pojo.Student;
import cn.hope.front.util.Utility;
public class U01D10000action extends Action{
Logger log = Logger.getLogger(U01D10000action.class.getName());
public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception {
DynaActionForm tFileForm = (DynaActionForm) form;
CRefourm crefourm=new CRefourm();//获得回帖的实体
crefourm=(CRefourm)tFileForm.get("u01crefourm");//获得回帖的实体
String tcon=crefourm.getTContent();
crefourm.setTContent(Utility.formatEnterStr(tcon));//回帖的的格式
HttpSession session=request.getSession();
Student student=new Student();
student=(Student)session.getAttribute("fm_username");//获得发帖者的实体
crefourm.setFlag("0");
crefourm.setStudent(student);
crefourm.setTTime(Utility.getCurDateTime());
CFourm cfourm=new CFourm();
cfourm=(CFourm)session.getAttribute("cfm");
crefourm.setCFourm(cfourm);//吧信息放到回帖的实体中去
U01D10000bo ud10000bo=new U01D10000bo();
Integer in=new Integer(0);
in=ud10000bo.D10000insert(crefourm);//吧回帖提交到数据库中去
if(in==null){
return mapping.findForward("failed");
}
return mapping.findForward("U01D54");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -