• 大小: 5.43MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-02
  • 语言: Java
  • 标签: java  毕业设计  

资源简介

Java 毕业设计源代码(简单的个人博客系统),开源可以做扩展。 测试完整的个人博客系统源代码,适合作为初始版本的毕业设计,根据个人需要调试修改。

资源截图

代码片段和文件信息

package com.blog.system.action;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.blog.system.Dao.CommentDao;
import com.blog.system.Dao.UserDao;
import com.blog.system.Dto.CommentBean;
import com.blog.system.Dto.UserBean;

public class CommentServlet extends HttpServlet {
public void doGet(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
request.setCharacterEncoding(“utf-8“);
String param = request.getParameter(“param“);
if (param == null) {
param = “view“;
}
if (param == “view“ || param.equals(“view“)) {
getComment(request response);
} else if (param == “del“ || param.equals(“del“)) {
try {
String commentid = request.getParameter(“commentid“);
CommentDao cd = new CommentDao();
cd.delComment(commentid);
} catch (Exception e) {
e.printStackTrace();
}
getComment(request response);
} else if (param == “singlecomment“ || param.equals(“singlecomment“)) {
String commentid = request.getParameter(“commentid“);
CommentDao cd = new CommentDao();
CommentBean cb = cd.getSingleComment(commentid);
request.setAttribute(“singlecomment“ cb);
RequestDispatcher requestDispatcher = request
.getRequestDispatcher(“/system/singlecomment.jsp“);
requestDispatcher.forward(request response);
}
}

public void doPost(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
doGet(request response);
}

public void getComment(HttpServletRequest request
HttpServletResponse response) throws IOException ServletException {
int page;
if (request.getParameter(“page“) != null) {
page = Integer.parseInt(request.getParameter(“page“));
} else {
page = 1;
}
int size = 10;
List ret = new ArrayList();
CommentDao cd = new CommentDao();
try {
ret = cd.getComment(page size);
long count = cd.getCommentCount();
request.setAttribute(“comment“ ret);
request.setAttribute(“count“ count);
request.setAttribute(“page“ page);
request.setAttribute(“size“ size);
RequestDispatcher requestDispatcher = request
.getRequestDispatcher(“/system/systemcomment.jsp“);
requestDispatcher.forward(request response);
} catch (Exception e) {
e.printStackTrace();
}
}
}

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

     文件        833  2017-03-26 13:16  blog1.0\.classpath

     文件       1040  2017-03-27 16:46  blog1.0\.project

     文件        503  2017-03-26 13:16  blog1.0\.settings\.jsdtscope

     文件        364  2017-03-26 13:16  blog1.0\.settings\org.eclipse.jdt.core.prefs

     文件        464  2017-03-26 13:16  blog1.0\.settings\org.eclipse.wst.common.component

     文件        345  2017-03-26 13:16  blog1.0\.settings\org.eclipse.wst.common.project.facet.core.xml

     文件         49  2017-03-26 13:16  blog1.0\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2017-03-26 13:16  blog1.0\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件       3247  2017-04-25 15:43  blog1.0\build\classes\com\blog\system\action\CommentServlet.class

     文件       4115  2017-04-25 15:43  blog1.0\build\classes\com\blog\system\action\DailyServlet.class

     文件       2802  2017-04-25 15:43  blog1.0\build\classes\com\blog\system\action\Daily_CServlet.class

     文件       3272  2017-04-25 15:43  blog1.0\build\classes\com\blog\system\action\MessageServlet.class

     文件       3204  2017-04-25 15:43  blog1.0\build\classes\com\blog\system\action\PhotoServlet.class

     文件       2802  2017-04-25 15:43  blog1.0\build\classes\com\blog\system\action\Photo_Cservlet.class

     文件       3933  2017-04-25 15:43  blog1.0\build\classes\com\blog\system\action\UserServlet.class

     文件       6292  2017-04-25 15:43  blog1.0\build\classes\com\blog\system\Dao\CommentDao.class

     文件       7417  2017-04-25 15:43  blog1.0\build\classes\com\blog\system\Dao\DailyDao.class

     文件       6110  2017-04-25 15:43  blog1.0\build\classes\com\blog\system\Dao\MessageDao.class

     文件       6040  2017-04-25 15:43  blog1.0\build\classes\com\blog\system\Dao\PhotoalbumDao.class

     文件       6952  2017-04-25 15:43  blog1.0\build\classes\com\blog\system\Dao\PhotoDao.class

     文件       6276  2017-04-25 15:43  blog1.0\build\classes\com\blog\system\Dao\UserDao.class

     文件       1788  2017-04-25 15:43  blog1.0\build\classes\com\blog\system\Dto\CommentBean.class

     文件       1970  2017-04-25 15:43  blog1.0\build\classes\com\blog\system\Dto\DailyBean.class

     文件       1603  2017-04-25 15:43  blog1.0\build\classes\com\blog\system\Dto\MessageBean.class

     文件       1430  2017-04-25 15:43  blog1.0\build\classes\com\blog\system\Dto\PhotoalbumBean.class

     文件       1812  2017-04-25 15:43  blog1.0\build\classes\com\blog\system\Dto\PhotoBean.class

     文件       3847  2017-04-25 15:43  blog1.0\build\classes\com\blog\system\Dto\UserBean.class

     文件       2132  2017-04-25 15:43  blog1.0\build\classes\com\blog\use\action\BlogListServlet.class

     文件       4727  2017-04-25 15:43  blog1.0\build\classes\com\blog\use\action\DailyCommentServlet.class

     文件       5567  2017-04-25 15:43  blog1.0\build\classes\com\blog\use\action\DailyServlet.class

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

评论

共有 条评论