springboot爱心帮助系统网站(志愿者/爱心项目/报名审核/团体管理)javaweb+ssmg

该爱心帮助系统网站的实现节省了人们的时间,使交易更加方便快捷。满足了用户足不出户就能从网上查找自己想要的信息,节省了外出查找各种信息的时间。在我国,网络快速的发展,改变了传统人们的生活方式,实现了网上公益爱心活动报名的方法,方便了人们去参加更多公益爱心活动。
为了开发一套好用、合适并且功能齐全的爱心帮助系统网站系统,在设计开发前期对爱心帮助系统网站有关的理论知识做了相应的了解。采用各种技术手段和涉及网络安全的相关技术,对系统做了整体开发。
经过以上分析,系统最终采用JSP为系统的开发工具。利用MYSQL对数据库对系统进行管理与维护。系统开发过程中,我深入学习了JSP和MYSQL的各种技术知识,并对网站相关功能和内容做了详细分析,详细完善了系统的开发。
 

表6 prep 爱心帮助活动报名表

名称

类型

说明

id

int

编号

title

nvarchar(50)

标题

address

nvarchar(50)

地址

time

nvarchar(50)

日期

linkman

nvarchar(50)

联系人

[content]

text

内容

addtime

nvarchar(50)

日期

 

package com.control.corporation;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.dao.CorporationInfoDAO;
import com.util.PublicToolCheckParam;
import com.util.PublicToolShowCorporationInfoList;

public class ManageCorporationInfo extends HttpServlet {

	/**
	 * 
	 */
	private static final long serialVersionUID = 3099608914702213565L;
	static CorporationInfoDAO cdao = new CorporationInfoDAO();

	public  static void coolCorporationInfo(HttpServletRequest request, HttpServletResponse response)
		throws ServletException, IOException {
			String corporationId = request.getParameter("corporationId");
			String isCooled = request.getParameter("isCooled");
			if(PublicToolCheckParam.checkNullAndEmpty(corporationId) && PublicToolCheckParam.checkNullAndEmpty(isCooled)){
					cdao.coolCorporation(Integer.parseInt(corporationId),Integer.parseInt(isCooled));
					String isSearching = request.getParameter("isSearching");
					String currentPage = request.getParameter("currentPage");
					if(PublicToolCheckParam.checkNullAndEmpty(isSearching)){
						String key = request.getParameter("key");
						PublicToolShowCorporationInfoList.searchCorporationInfo(request, response, currentPage, key);
						request.setAttribute("key", key);
						request.setAttribute("isSearching", "yes");
					}
					else{
						PublicToolShowCorporationInfoList.showCorporationInfoList(request, response, currentPage);
					}
			}
			request.getRequestDispatcher("../corporation/manageCorporationInfo.jsp").forward(request, response);
			
	}

	public static void coolMoreCorporationInfo(HttpServletRequest request, HttpServletResponse response)
		throws ServletException, IOException {
		
			String currentPage = request.getParameter("currentPage");
			String[] ckb = request.getParameterValues("ckb");
			if(ckb != null){
				for(int i=0;i<ckb.length;i++){
	//				cdao.coolCorporation(Integer.parseInt(ckb[i]));
				}
			}
			PublicToolShowCorporationInfoList.showCorporationInfoList(request, response, currentPage);
			request.getRequestDispatcher("../corporation/manageCorporationInfo.jsp").forward(request, response);
		
	}

	public static void searchCorporationInfo(HttpServletRequest request, HttpServletResponse response)
		throws ServletException, IOException {
		
			String currentPage = request.getParameter("currentPage");
			String key = request.getParameter("key");
			PublicToolShowCorporationInfoList.searchCorporationInfo(request, response, currentPage, key);
			request.setAttribute("isSearching", "yes");
			request.setAttribute("key", key);
			request.getRequestDispatcher("../corporation/manageCorporationInfo.jsp").forward(request, response);
		
	}

	public static void showManageCorporationInfoPage(HttpServletRequest request, HttpServletResponse response)
		throws ServletException, IOException {
		
			String currentPage = request.getParameter("currentPage");
			PublicToolShowCorporationInfoList.showCorporationInfoList(request, response, currentPage);
			request.getRequestDispatcher("../corporation/manageCorporationInfo.jsp").forward(request, response);
	
	}


/**
 * Constructor of the object.
 */
public ManageCorporationInfo() {
	super();
}


/**
 * Destruction of the servlet. <br>
 */
public void destroy() {
	super.destroy(); // Just puts "destroy" string in log
	// Put your code here
}

/**
 * The doGet method of the servlet. <br>
 *
 * This method is called when a form has its tag value method equals to get.
 * 
 * @param request the request send by the client to the server
 * @param response the response send by the server to the client
 * @throws ServletException if an error occurred
 * @throws IOException if an error occurred
 */
public void doGet(HttpServletRequest request, HttpServletResponse response)
		throws ServletException, IOException {

	doPost(request, response);
}

/**
 * The doPost method of the servlet. <br>
 *
 * This method is called when a form has its tag value method equals to post.
 * 
 * @param request the request send by the client to the server
 * @param response the response send by the server to the client
 * @throws ServletException if an error occurred
 * @throws IOException if an error occurred
 */
public void doPost(HttpServletRequest request, HttpServletResponse response)
		throws ServletException, IOException {


String method = request.getParameter("method");
if(PublicToolCheckParam.checkNullAndEmpty(method)){
	if(method.equals("showManageCorporationInfoPage")){
		showManageCorporationInfoPage(request, response);
	}
	else if(method.equals("cool")){
		coolCorporationInfo(request, response);
	}
	else if(method.equals("coolMore")){
		coolMoreCorporationInfo(request, response);
	}
	else if(method.equals("search")){
		searchCorporationInfo(request, response);
	}
}
}

	/**
	 * Initialization of the servlet. <br>
	 *
	 * @throws ServletException if an error occurs
	 */
	public void init() throws ServletException {
		// Put your code here
	}

}

猜你喜欢

转载自blog.csdn.net/a779289061/article/details/113773376