• 大小: 19.29M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-06-26
  • 语言: Java
  • 标签: 其他  

资源简介

基于Jsp的大学生社团管理系统项目.zip

资源截图

代码片段和文件信息

package action;

import dao.ActiDao;
import daoImpl.ActiDaoImpl;
import entity.Activity;


import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by asus on 2017/7/13.
 */
@WebServlet(name = “ActiServlet“)
public class ActiServlet extends HttpServlet {
    protected void doPost(HttpServletRequest request HttpServletResponse response) throws ServletException IOException {
doGet(request response);
    }

    protected void doGet(HttpServletRequest request HttpServletResponse response) throws ServletException IOException {
        String act_id = request.getParameter(“id“);
        String op = request.getParameter(“op“);
        String org_id = request.getParameter(“org_id“);
        System.out.print(act_id);
        System.out.print(op);

       // HttpSession session = request.getSession();
       // int org_id =(int)session.getAttribute(““);//社团id
        //String op=request.getParameter(“op“);//获取修改还是删除
        ActiDao actdao = new ActiDaoImpl();
        if(op.equals(“delete“)) {
            //System.out.println(“yes“);
            int nAct_id = Integer.parseInt(act_id);
            actdao.deleteActi(nAct_id);
            System.out.print(“delete success“);
        }
       else if(op.equals(“update“))
        {
            String acti_title=request.getParameter(“act_title“);
            String acti_content=request.getParameter(“act_content“);
            Activity acti=new Activity();
            int nAct_id = Integer.parseInt(act_id);
            acti.setAct_id(nAct_id);
            acti.setOrg_id(Integer.parseInt(org_id));
            //acti.setAct_date(“2017-07-12 20:11“);
            acti.setAct_content(acti_content);
            acti.setAct_title(acti_title);
           actdao.update(acti);
            System.out.print(“update success“);
        }
        else if(op.equals(“add“))
        {
            SimpleDateFormat sdf = new SimpleDateFormat(“yyyy-MM-dd HH:mm:ss“);
            Date date = new Date();
            String now = sdf.format( date );
            String acti_title=request.getParameter(“act_title“);
            String acti_content=request.getParameter(“act_content“);
            Activity acti=new Activity();
            //acti.setAct_id(Act_id);
            acti.setOrg_id(Integer.parseInt(org_id));
            acti.setAct_date(now);//创建时间
            acti.setAct_content(acti_content);
            acti.setAct_title(acti_title);
            actdao.addActi(acti);
            System.out.print(“add success“);
        }
        request.getRequestDispatcher(“activity.jsp?org_id=“+Integer.parseInt(org_id)).forward(requestresponse);
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-05-27 01:24  Association-Manage\
     文件       42637  2019-05-27 01:24  Association-Manage\sql.sql
     目录           0  2019-05-27 01:24  Association-Manage\src\
     目录           0  2019-05-27 01:24  Association-Manage\src\action\
     文件        2932  2019-05-27 01:24  Association-Manage\src\action\ActiServlet.java
     文件        2612  2019-05-27 01:24  Association-Manage\src\action\AgreeEnterServlet.java
     文件        4982  2019-05-27 01:24  Association-Manage\src\action\ApplyNoticeServlet.java
     文件        1847  2019-05-27 01:24  Association-Manage\src\action\CreateEnterServlet.java
     文件        1874  2019-05-27 01:24  Association-Manage\src\action\CreateOrgServlet.java
     文件        1636  2019-05-27 01:24  Association-Manage\src\action\CreateRecServlet.java
     文件        2686  2019-05-27 01:24  Association-Manage\src\action\EnterServlet.java
     文件        1017  2019-05-27 01:24  Association-Manage\src\action\ExitServlet.java
     文件        4149  2019-05-27 01:24  Association-Manage\src\action\ManaComUserServlet.java
     文件        3477  2019-05-27 01:24  Association-Manage\src\action\ManaOrgServlet.java
     文件        1775  2019-05-27 01:24  Association-Manage\src\action\ModiPersonServlet.java
     文件         688  2019-05-27 01:24  Association-Manage\src\action\ModifyComServlet.java
     文件        1939  2019-05-27 01:24  Association-Manage\src\action\NotiServlet.java
     文件        4353  2019-05-27 01:24  Association-Manage\src\action\RecServlet.java
     文件        1136  2019-05-27 01:24  Association-Manage\src\action\RegisterAction.java
     文件        3333  2019-05-27 01:24  Association-Manage\src\action\RegisterServlet.java
     文件        5488  2019-05-27 01:24  Association-Manage\src\action\UsermesServlet.java
     文件        1582  2019-05-27 01:24  Association-Manage\src\action\adminLoginServlet.java
     文件        4024  2019-05-27 01:24  Association-Manage\src\action\subIdentiCode.java
     文件         857  2019-05-27 01:24  Association-Manage\src\action\testServlet.java
     文件        1719  2019-05-27 01:24  Association-Manage\src\action\userLoginServlet.java
     目录           0  2019-05-27 01:24  Association-Manage\src\comm\
     文件        6273  2019-05-27 01:24  Association-Manage\src\comm\baseDao.java
     目录           0  2019-05-27 01:24  Association-Manage\src\dao\
     文件         427  2019-05-27 01:24  Association-Manage\src\dao\ActiDao.java
     文件         827  2019-05-27 01:24  Association-Manage\src\dao\ComUserDao.java
     文件         469  2019-05-27 01:24  Association-Manage\src\dao\CommuDao.java
............此处省略313个文件信息

评论

共有 条评论