91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小:
    文件類型: .7z
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2023-10-07
  • 語(yǔ)言: 其他
  • 標(biāo)簽: 畢業(yè)課題??

資源簡(jiǎn)介

房屋租賃管理系統(tǒng)源碼 房屋租賃管理系統(tǒng)源碼

資源截圖

代碼片段和文件信息

package?com.action;

/**
?*?網(wǎng)站公告
?*?@author?Administrator
?*
?*/

import?java.io.IOException;

import?javax.servlet.ServletException;
import?javax.servlet.http.HttpServlet;
import?javax.servlet.http.HttpServletRequest;
import?javax.servlet.http.HttpServletResponse;
import?javax.servlet.http.HttpSession;

import?com.bean.AfficheBean;
import?com.bean.SystemBean;
import?com.util.Constant;
import?com.util.Filter;

public?class?AfficheServlet?extends?HttpServlet?{

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

/**
?*?Destruction?of?the?servlet.?

?*/
public?void?destroy()?{
super.destroy();?//?Just?puts?“destroy“?string?in?log
//?Put?your?code?here
}

/**
?*?The?doGet?method?of?the?servlet.?

?*
?*?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(requestresponse);
}

/**
?*?The?doPost?method?of?the?servlet.?

?*
?*?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?{

response.setContentType(Constant.CONTENTTYPE);
request.setCharacterEncoding(Constant.CHARACTERENCODING);
String?sysdir?=?new?SystemBean().getDir();
HttpSession?session?=?request.getSession();
try{
String?username2?=?(String)session.getAttribute(“user“);
if(username2?==?null){
request.getRequestDispatcher(“error.jsp“).forward(request?response);
}
else{
AfficheBean?afficheBean?=?new?AfficheBean();
String?method?=?request.getParameter(“method“).trim();
if(method.equals(“addAffiche“)){//增加公告
String?title?=?Filter.escapeHTMLTags(request.getParameter(“title“).trim());
String?content?=?Filter.escapeHTMLTags(request.getParameter(“content“).trim());
String?adder?=?username2;
String?ifhide?=?Filter.escapeHTMLTags(request.getParameter(“ifhide“).trim());
int?flag?=?afficheBean.addAffiche(title?content?adder?ifhide);
if(flag?==?Constant.SUCCESS){
request.setAttribute(“message“?“操作成功!“);
request.getRequestDispatcher(sysdir+“/affiche/index.jsp“).forward(request?response);
}
else{
request.setAttribute(“message“?“系統(tǒng)維護(hù)中請(qǐng)稍后再試!“);
request.getRequestDispatcher(sysdir+“/affiche/index.jsp“).forward(

評(píng)論

共有 條評(píng)論