首页>代码>Java web旅游汽车公司车辆管理系统>/che/src/servlet/updateluruservlet.java
package servlet;

import java.io.IOException;
import java.io.PrintWriter;

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

import che.dao.impl.chaxunDAOImpl;
import che.data.paiche;

public class updateluruservlet extends HttpServlet {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	public updateluruservlet() {
		super();
	}
	public void destroy() {
		super.destroy(); // Just puts "destroy" string in log
		// Put your code here
	}
	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		         doPost(request,response);}
	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		    request.setCharacterEncoding("UTF-8");
            int zhi =Integer.parseInt(request.getParameter("id"));
            String mima1=request.getParameter("mima1");
    	    String mima2=request.getParameter("mima2");
    	    String hao22 =(String)request.getParameter("chaxun");
 		   String hao32 =(String)request.getParameter("xinxi");
 		   String time1=(String)request.getParameter("timeStart");
 		   String time2=(String)request.getParameter("timeEnd");
 		   String hhh=request.getParameter("page");
            chaxunDAOImpl cha=new chaxunDAOImpl();
            try{
            	 if(cha.mima(mima1,mima2)){
		          paiche ss=cha.queryluruById(zhi);
		          request.setAttribute("studata",ss);
		          this.getServletConfig().getServletContext().getRequestDispatcher("/111.jsp?page="+hhh+"&timeStart="+time1+"&timeEnd="+time2+"&chaxun="+hao22+"&xinxi="+java.net.URLEncoder.encode(hao32,"UTF-8")+"").forward(request,response);
            	 }else
    	    	 {
         	    	PrintWriter out = response.getWriter();
         	        out.print("<script>" + "alert('密码错误!');"+ "document.location.href='../lurucheliangxinxi.jsp?page="+hhh+"&timeStart="+time1+"&timeEnd="+time2+"&chaxun="+hao22+"&xinxi="+java.net.URLEncoder.encode(hao32,"UTF-8")+"';"+ "</script>");
         	          out.close();
         	         return;
         	    	 }
              }catch(Exception e){
                 System.out.println(e.getMessage()); 
 }
	}
	public void init() throws ServletException {
		// Put your code here
	}

}
最近下载更多
微信网友_6050164023693312  LV2 2023年12月27日
刘洋66666  LV1 2023年11月5日
adap12345  LV5 2023年6月15日
berty boom  LV4 2023年6月12日
846488283  LV4 2023年5月29日
泓鼎168  LV19 2023年3月31日
北方菜  LV11 2022年12月30日
2385649653  LV7 2022年11月4日
huwenxuan  LV6 2022年6月22日
testuser1234567  LV24 2022年6月15日
最近浏览更多
m5433660  LV1 3月28日
maniheim  LV7 2月7日
lilong007  LV20 2023年12月30日
hxy19991216  LV4 2023年12月29日
微信网友_6050164023693312  LV2 2023年12月27日
asddwh  LV12 2023年12月26日
zn2020  LV1 2023年12月18日
暂无贡献等级
逝水莲花  LV7 2023年12月3日
Ghost19850101 2023年11月24日
暂无贡献等级
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友