• 大小: 15.87MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-06-18
  • 语言: 其他
  • 标签: 论坛源码  

资源简介

BBS论坛的发帖,回帖功能,以及帖子的不同形式的展现。还有管理员删帖,修改帖的功能

资源截图

代码片段和文件信息

package action;

import java.sql.Timestamp;
import java.util.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionSupport;

import dao.*;
import entity.*;

@SuppressWarnings(“serial“)
public class AddPostAction extends ActionSupport{

private Post post;

public Post getPost() {
return post;
}

public void setPost(Post post) {
this.post = post;
}

public String execute(){
HttpServletRequest request = ServletActionContext.getRequest();
HttpSession session = request.getSession();
User user = (User)session.getAttribute(“loginUser“);
ForumDao forumDao = new ForumDao();
post.setPostTime(new Timestamp(new Date().getTime()));
post.setUser(user);
forumDao.savePost(post);
user.setUserPoints(user.getUserPoints()+3);
forumDao.updateUser(user);
return SUCCESS;


}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       3707  2012-05-02 19:55  Forum\.classpath

     文件        530  2012-05-02 19:55  Forum\.myhibernatedata

     文件        288  2012-05-03 17:11  Forum\.mymetadata

     文件       1613  2012-05-02 19:55  Forum\.project

     文件        500  2012-05-02 19:55  Forum\.settings\.jsdtscope

     文件         49  2012-05-02 19:55  Forum\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2012-05-02 19:55  Forum\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件        655  2012-05-02 19:55  Forum\src\action\AddPostAction-validation.xml

     文件        962  2012-05-02 19:55  Forum\src\action\AddPostAction.java

     文件       1562  2012-05-02 19:55  Forum\src\action\AllPostAction.java

     文件       1055  2012-05-02 19:55  Forum\src\action\DeleteMyPostAction.java

     文件       1053  2012-05-02 19:55  Forum\src\action\DeletePostAction.java

     文件       1973  2012-05-02 19:55  Forum\src\action\EnrollAction-validation.xml

     文件       1028  2012-05-02 19:55  Forum\src\action\EnrollAction.java

     文件        823  2012-05-02 19:55  Forum\src\action\ExitAction.java

     文件        718  2012-05-02 19:55  Forum\src\action\LoginAction-validation.xml

     文件       1013  2012-05-02 19:55  Forum\src\action\LoginAction.java

     文件        526  2012-05-02 19:55  Forum\src\action\ManagerLoginAction-validation.xml

     文件       1149  2012-05-02 19:55  Forum\src\action\ManagerLoginAction.java

     文件        215  2012-05-02 19:55  Forum\src\action\PersonalInformationAction.java

     文件       1018  2012-05-02 19:55  Forum\src\action\PersonalManageAction-validation.xml

     文件        981  2012-05-02 19:55  Forum\src\action\PersonalManageAction.java

     文件       1771  2012-05-02 19:55  Forum\src\action\PersonalPostAction.java

     文件        710  2012-05-02 19:55  Forum\src\action\PostMatterAction.java

     文件       1858  2012-05-02 19:55  Forum\src\action\UpdatePasswordAction.java

     文件        718  2012-05-02 19:55  Forum\src\action\UserInformationAction.java

     文件        893  2012-05-03 17:12  Forum\src\config\hibernate.cfg.xml

     文件       3331  2012-05-02 19:55  Forum\src\config\HibernateSessionFactory.java

     文件       5684  2012-05-02 19:55  Forum\src\dao\ForumDao.java

     文件        782  2012-05-02 19:55  Forum\src\entity\Manager.hbm.xml

............此处省略128个文件信息

评论

共有 条评论