首页>代码>jsp+servlet开发java web在线租车服务系统>/opencar/src/com/weishang/action/recept/ReceptAction.java
package com.weishang.action.recept;
import java.io.IOException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@WebServlet(displayName="前台页面(主要的action)",name="ReceptAction",urlPatterns="/recept")
public class ReceptAction extends HttpServlet {
	
	private static final long serialVersionUID = 1L;


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

	/**
	 * Destruction of the servlet. <br>
	 */
	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 {
		String action=request.getParameter("action");
		String menuId=request.getParameter("menuId");
		String paerntMenu=request.getParameter("paerntMenu");
		Integer pageNo=0;
		String pageNoTem=request.getParameter("page");
		if(pageNoTem!=null){//有分页
			RequestDispatcher rd = request.getRequestDispatcher("/"+action+"?menuId="+menuId+"&page="+pageNo);
			rd.forward(request,response);
		}else{//无分页
			if(paerntMenu==null){
				RequestDispatcher rd = request.getRequestDispatcher("/"+action+"?menuId="+menuId);
				rd.forward(request,response);
			}else{
				RequestDispatcher rd = request.getRequestDispatcher("/"+action+"?menuId="+menuId+"&paerntMenu="+paerntMenu);
				rd.forward(request,response);
			}
			
		}
	}

	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

	
	}


	public void init() throws ServletException {
		// Put your code here
	}

}
最近下载更多
柳咪华沙  LV7 2024年6月28日
fei3655  LV6 2022年9月20日
admin115  LV6 2022年5月24日
monan111  LV2 2022年3月2日
duizhang  LV6 2022年2月19日
houliukou  LV38 2022年1月18日
I哎I呀I呀I  LV3 2021年11月22日
开心阿楠  LV5 2021年9月18日
zwbshuai  LV13 2021年8月26日
newbag  LV9 2021年8月9日
最近浏览更多
小松哥11  LV3 2024年10月24日
张泽帅  LV6 2024年10月21日
柳咪华沙  LV7 2024年6月28日
yunsgui  LV1 2024年6月26日
lmccccc 2024年6月19日
暂无贡献等级
hebao007 2024年5月22日
暂无贡献等级
fuyouou  LV5 2024年3月14日
pumpkin_77 2024年1月20日
暂无贡献等级
axdfer 2024年1月4日
暂无贡献等级
asddwh  LV13 2023年12月26日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友