protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		
		//ZbV̕
		HttpSession session = request.getSession();
		
		//ZbVIuWFNglogino
		boolean login = false;
		if (session.getAttribute("login") != null) {
			login = (Boolean)session.getAttribute("login");
		}
		
		//ZbVIuWFNgdisplayUserNameoB
		String displayUserName = (String)session.getAttribute("displayUserName");
		
		//󂯎f[^̕R[hUTF-8ɃZbg
		request.setCharacterEncoding("UTF-8");
		
		//p[^["title"̒loAϐtitleɑ
		String title = request.getParameter("title");
		//p[^["message"̒loAϐmessageɑ
		String message = request.getParameter("message");
		
		title = CheckLogin.replaceInput(title);
		message = CheckLogin.replaceInput(message);
		
		//INSERT̍쐬
		String sql = "INSERT INTO message_tb" +
					"(message_title,message,user_name)" +
					"VALUES" +
					"('" + title + "','" + message + "','" + displayUserName + "')";
		
		//^sbZ[W
		String outMessage = "";
		
		//ڑ
		String database = "jdbc:postgresql://192.168.30.55/val00262db";
		String user = "val00262";
		String password = "val262db";
		
		//RlNV錾
		Connection connection = null;
		Statement statement = null;
		//ڑ{ݏ
		try {
			//JDBChCo̓o^
			Class.forName("org.postgresql.Driver").newInstance();
			//JDBCoRŃf[^x[X֐ڑ
			connection = DriverManager.getConnection(database, user, password);
			//SQLf[^x[X֑邽߂̃IuWFNg𐶐
			statement = connection.createStatement();
			
			// OCĂINSERTs
			if (login) {
				int rows = statement.executeUpdate(sql);
				outMessage = "bZ[W" + rows + "o^܂B";
			}
			
		} catch (Exception e) {
			//ڑs
			outMessage = "bZ[W̓o^Ɏs܂B<br><br>" + e;
		}
		//ؒf
		try {
			// f[^x[X̐ؒf
			if (statement != null) statement.close();
			if (connection != null) connection.close();
			
		} catch (Exception e) {
			// ؒfs
			outMessage = "f[^x[X̐ؒfɎs܂B<br><br>" + e;
		}

		//OCsFOCʂ
		if (!login) {
			response.sendRedirect("login.html");
		}
		
		//LbVNA
		response.setHeader("Cache-Control",
				"no-store,no-cache, must-revalidte");
		response.addHeader("Cache-Control",
				"post-check=0, pre-check=0");
		response.setHeader("Pragma", "no-cache");
		response.setDateHeader("Expires", 0);
		Date today = new Date();
		response.setDateHeader("Last-Modified", today.getTime());
		
		//o͐̃Reg^CvZbg
		response.setContentType("text/html; charset=UTF-8");
		
		//o͐oAϐoutɑ
		PrintWriter out = response.getWriter();
		
		//o͓eZbg
		out.println("<html><body>");
		out.println("Login: <b>" + displayUserName + "</b>");
		out.println("<hr>");
		out.println("<a href=\"Menu\">yj[z</a>");
		out.println("<a href=\"Logout\">yOAEgz</a>");
		out.println("<hr>");
		out.println(outMessage);
		out.println("<br><br>");
		out.println("<a href=\"ShowMessage\">bZ[Wǂ</a>");
		out.println("</body></html>");
		
		//o͂
		out.close();
	}