📄 aboutus.java
字号:
package com.yhcms.cmsinfo.action;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
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 com.yhcms.cmsinfo.bean.AboutUsInfo;
import com.yhcms.cmsinfo.dao.CmsInfoDaoIm;
import com.yhcms.cmsinfo.itface.CmsInfoDao;
import com.yhcms.db.DBConnException;
import com.yhcms.utils.StringUtils;
/**
* <p>Title:系统属性关于我们,版权申明,联系我们Action</p>
* <li>系统属性关于我们,版权申明,联系我们</li>
* <br><b>CopyRight: yyhweb[由由华网]</b>
* @author stephen
* @version YH-2.0
*/
public class AboutUs extends Action{
public ActionForward execute(ActionMapping actionmapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response){
Logger yhlog = Logger.getLogger(AboutUs.class.getName());
String Info = request.getParameter("Info");
CmsInfoDao cmsdao = CmsInfoDaoIm.getInstance();
AboutUsInfo aboutus = null;
String content = "";
try {
aboutus = cmsdao.getAboutUs(Info);
} catch (DBConnException e) {
yhlog.warn("When get About us, copyright or contact us,throw an Exception!");
}
if(aboutus !=null){
content = StringUtils.htmlEncode(StringUtils.ubbEncode(aboutus.getAboutus()));
}
request.setAttribute("content",content);
request.setAttribute("Info",Info);
return actionmapping.findForward("Show");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -