bbs

所属分类:WEB开发
开发工具:Java
文件大小:16627KB
下载次数:37
上传日期:2008-07-02 09:57:38
上 传 者mtlai
说明:  本人以前做的BBS,用的是JDK1.5+Struts1.2+Spring2.0+Mysql5.0+Ibatis2.0+Tomcat5.5.9+Eclipse3.2,在此仅供大家学习和参考
(I used to make the BBS, using JDK1.5+ Struts1.2+ Spring2.0+ Mysql5.0+ Ibatis2.0+ Tomcat5.5.9+ Eclipse3.2, in this study and reference for everyone)

文件列表:
webapp\comm\css\yhbbs.css (1881, 2007-11-14)
webapp\comm\css\yhbbs1.css (1896, 2007-11-14)
webapp\comm\css\yhbbs2.css (1899, 2007-11-14)
webapp\comm\css\yhbbs3.css (1899, 2007-11-14)
webapp\comm\css\yhbbs4.css (1899, 2007-11-14)
webapp\comm\css\yhbbs5.css (1878, 2007-11-14)
webapp\comm\js\message.js (6456, 2007-11-14)
webapp\comm\js\skin.js (2991, 2007-11-14)
webapp\comm\js\ubb.js (9592, 2007-11-14)
webapp\comm\js\user.js (4763, 2007-11-14)
webapp\images\add_gg.gif (286, 2007-11-14)
webapp\images\allonline.gif (317, 2007-11-14)
webapp\images\alltop.gif (646, 2007-11-14)
webapp\images\announce.gif (428, 2007-11-14)
webapp\images\arttop.gif (226, 2007-11-14)
webapp\images\avatars\1.gif (2505, 2007-11-14)
webapp\images\avatars\10.gif (3009, 2007-11-14)
webapp\images\avatars\11.gif (2660, 2007-11-14)
webapp\images\avatars\12.gif (1517, 2007-11-14)
webapp\images\avatars\13.gif (1373, 2007-11-14)
webapp\images\avatars\14.gif (2998, 2007-11-14)
webapp\images\avatars\15.gif (2952, 2007-11-14)
webapp\images\avatars\16.gif (1683, 2007-11-14)
webapp\images\avatars\17.gif (2487, 2007-11-14)
webapp\images\avatars\18.gif (3261, 2007-11-14)
webapp\images\avatars\19.gif (1204, 2007-11-14)
webapp\images\avatars\2.gif (1113, 2007-11-14)
webapp\images\avatars\20.gif (1399, 2007-11-14)
webapp\images\avatars\21.gif (3068, 2007-11-14)
webapp\images\avatars\22.gif (3256, 2007-11-14)
webapp\images\avatars\23.gif (2949, 2007-11-14)
webapp\images\avatars\24.gif (2885, 2007-11-14)
webapp\images\avatars\25.gif (3095, 2007-11-14)
webapp\images\avatars\26.gif (2888, 2007-11-14)
webapp\images\avatars\27.gif (3264, 2007-11-14)
webapp\images\avatars\28.gif (3125, 2007-11-14)
webapp\images\avatars\29.gif (3313, 2007-11-14)
webapp\images\avatars\3.gif (3036, 2007-11-14)
webapp\images\avatars\30.gif (3043, 2007-11-14)
webapp\images\avatars\31.gif (3398, 2007-11-14)
... ...

package com.yhbbs.message.action; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; 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.ActionMessage; import org.apache.struts.action.ActionMessages; import com.yhbbs.message.biz.MessageBiz; import com.yhbbs.message.itface.Message; import com.yhbbs.user.itface.bean.UserSession; import com.yhbbs.utils.Constants; import com.yhbbs.utils.ReqUtils; import com.yhbbs.utils.StringUtils; /** *

Title:阅读站内短消息Action

*
  • 阅读我发送的短消息
    *
  • 阅读我接受的短消息
    *
    WebSite: www.yyhweb.com *
    CopyRight: yyhweb[由由华网] * @author stephen * @version YHBBS-2.0 */ public class ReadMessage extends Action { public ActionForward execute(ActionMapping mapping,ActionForm form, HttpServletRequest request,HttpServletResponse response){ ActionMessages errors = new ActionMessages(); // 用户检查 UserSession curUser = (UserSession) request.getSession(true).getAttribute(Constants.bbsuser); if(curUser==null){ errors.add("message.no.user",new ActionMessage("message.no.user")); saveErrors(request,errors); return mapping.findForward("Failure"); } String userName = curUser.getUsername(); String action=ReqUtils.getString(request, "a"); int msgId = ReqUtils.getInt(request, "msgId"); // 阅读发送的消息 if(action!=null && action.equals("send")) request.setAttribute("a", "send"); else MessageBiz.ReadMsg(msgId); Message curMsg = MessageBiz.getMessage(msgId); // 未取得消息 if(curMsg==null){ errors.add("message.no.exist",new ActionMessage("message.no.exist")); saveErrors(request,errors); return mapping.findForward("Failure"); } // html化 String content = curMsg.getContent(); curMsg.setContent(StringUtils.htmlEncode(content)); request.setAttribute("username", userName); request.setAttribute("message", curMsg); return mapping.findForward("Success"); } }

  • 近期下载者

    相关文件


    收藏者