资源简介
基于spring+Struts1+hibernate框架开发的论坛系统

代码片段和文件信息
/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package action;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import util.Pagination;
import form.BoardForm;
import Service.IBoardService;
import Service.ICategoryService;
import Service.IPersonService;
import Service.IThreadService;
import bean.Board;
import bean.Category;
import bean.Person;
import bean.Thread;
/**
* MyEclipse Struts Creation date: 07-04-2008
*
* XDoclet definition:
*
* @struts.action path=“/board“ name=“boardForm“
* input=“/form/board/listBoard.jsp“ parameter=“action“
* scope=“request“ validate=“true“
*/
public class BoardAction extends ForumAction {
private ICategoryService categoryService;
private IBoardService boardService;
private IThreadService threadService;
private IPersonService personService;
@Override
@SuppressWarnings(“all“)
public ActionForward list(ActionMapping mapping ActionForm formHttpServletRequest request HttpServletResponse response) {
BoardForm boardForm = (BoardForm) form;
Board board = boardService.find(Board.class boardForm.getBoard().getId());
boardForm.setBoard(board);
int totalCount = threadService.getTotalCount(“ select count(t) from Thread t “+ “ where t.deleted = false and t.board.id = “+ board.getId() null);
Pagination pagination = new Pagination(request response);
pagination.setRecordCount(totalCount);
List threadList = threadService.list(“ select t from Thread t “+ “ where t.deleted = false and t.board.id = “ + board.getId()
+ “ order by t.dateLastReplied desc “ pagination.getFirstResult() pagination.getPageSize() null);
request.setAttribute(“board“ board);
request.setAttribute(“pagination“ pagination);
request.setAttribute(“threadList“ threadList);
boardForm.settitle(“帖子列表 - 版面:“ + board.getName());
return new ActionForward(“list“ “/jsp/thread/listThread.jsp“ false);
}
public ActionForward initAdd(ActionMapping mapping ActionForm formHttpServletRequest request HttpServletResponse response) {
BoardForm boardForm = (BoardForm) form;
boardForm.settitle(“添加版面“);
List categoryList = categoryService.list(“ from Category c where c.deleted = false “);
request.setAttribute(“categoryList“ categoryList);
return new ActionForward(“add“ “/jsp/board/addBoard.jsp“ false);
}
public ActionForward add(ActionMapping mapping ActionForm formHttpServletRequest request HttpServletResponse response) {
BoardForm boardForm = (BoardForm) form;
boardForm.settitle(“添加版面“);
Category category = categoryService.find(Category.class
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1961 2016-11-18 22:20 Forum\.classpath
文件 348 2016-11-17 16:50 Forum\.myhibernatedata
文件 1396 2016-11-17 22:09 Forum\.project
文件 522 2016-11-17 12:07 Forum\.settings\.jsdtscope
文件 341 2016-11-19 21:52 Forum\.settings\com.genuitec.runtime.libraries.xm
文件 364 2016-11-17 12:07 Forum\.settings\org.eclipse.jdt.core.prefs
文件 552 2016-11-17 22:08 Forum\.settings\org.eclipse.wst.common.component
文件 646 2016-11-17 22:09 Forum\.settings\org.eclipse.wst.common.project.facet.core.prefs.xm
文件 562 2016-11-17 22:09 Forum\.settings\org.eclipse.wst.common.project.facet.core.xm
文件 49 2016-11-17 12:07 Forum\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2016-11-17 12:07 Forum\.settings\org.eclipse.wst.jsdt.ui.superType.name
文件 458 2016-11-17 22:09 Forum\.springBeans
文件 5656 2016-12-27 10:44 Forum\src\action\BoardAction.java
文件 2305 2016-12-25 15:01 Forum\src\action\CategoryAction.java
文件 1232 2016-12-27 11:04 Forum\src\action\ForumAction.java
文件 5747 2016-12-25 10:56 Forum\src\action\PersonAction.java
文件 3342 2016-12-27 21:46 Forum\src\action\ReplyAction.java
文件 4907 2016-12-27 16:47 Forum\src\action\ThreadAction.java
文件 7788 2017-02-19 17:10 Forum\src\applicationContext.xm
文件 1165 2016-11-17 16:30 Forum\src\bean\ba
文件 2183 2016-11-17 16:34 Forum\src\bean\Board.java
文件 645 2016-11-20 22:21 Forum\src\bean\Category.java
文件 2197 2016-11-17 16:27 Forum\src\bean\Person.java
文件 1375 2016-11-17 16:35 Forum\src\bean\Reply.java
文件 2560 2016-11-17 16:35 Forum\src\bean\Thread.java
文件 88 2016-11-17 22:08 Forum\src\com\yourcompany\struts\ApplicationResources.properties
文件 1482 2016-12-25 09:05 Forum\src\dao\DaoImpl.java
文件 482 2016-11-18 10:34 Forum\src\dao\IDao.java
文件 1166 2016-12-25 11:55 Forum\src\exception\ForumExceptionHandler.java
文件 1057 2016-09-27 15:38 Forum\src\filter\CharacterEncodingFilter.java
............此处省略500个文件信息
- 上一篇:esp8266的AT固件
- 下一篇:Forum_ssm_ssm
相关资源
- 让你页面速度飞起来 Web前端性能优化
- swebok-v3
- 登录注册界面.zip48872
- Web Api 通过文件流 文件到本地
-
大数据。基于Hba
se的网站日志分析系 - Servlet API中文文档
- 编写简单的RMI程序 多线程web 服务器
- 基于web的毕业设计开题报告
- web班级网站设计代码
- websocket实现一对一聊天
- 3DWebGIS 3DWebGIS
- web js虚拟键盘(中英文切换)
- WinCE中的Web Service调用
- WEB系统界面设计模板(很漂亮)
- web民族旅游网站源码
- ssh框架实现的学生管理系统
- 基于Web的高校教务管理系统的设计与
- 通过webservice上传和下载文件
- 基于SSM+CXF构建的RESTFul webservice
- 基于串口设备的嵌入式Web服务器系统
-
UnityWebPla
yer及UnityWebPla yerFull -
UnityWebPla
yerFull - Windows下访问LINUX的利器-SSH
- 海康威视 WEB无插件开发包 V3.2
- 简单的ssh框架实现增删改查
- 学生学籍管理系统web
- web开发舔狗日记 框架bootstrap
- 很好用的网站前端页面爬取工具
- NetApp NetCache助HypoVereinsbank实现安全快
- 最新WebShell管理工具增强版3.0
评论
共有 条评论