package com.mingsoft.servlet.install;

import java.io.IOException;

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

import com.mingsoft.constant.JspPage;
import com.mingsoft.servlet.BaseServlet;
import com.mingsoft.util.StringUtil;

/**
 * @author 荣繁奎
 * @date:2013-11-18 上午10:33:24
 * @version : 控制安装页面的跳转
 * QQ:1096199590
 * 技术支持：铭飞科技
 * 官网：www.ming-soft.com
 */
@SuppressWarnings("serial")
public class InstallStepServlet extends BaseServlet {

	@Override
	protected void doGet(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		super.doGet(request, response);
		//判断用户的跳转页面
		String step = request.getParameter("step");
		int num = 0;
		if(StringUtil.strNull(step)){
			request.getRequestDispatcher(JspPage.INSTALL_FIRST).forward(request, response);
		}else{
			num = Integer.parseInt(step);
		}
		//根据参数进行跳转
		if(num==1){
			request.getRequestDispatcher(JspPage.INSTALL_FIRST).forward(request, response);
		}else if(num==2){
			request.getRequestDispatcher(JspPage.INSTALL_SECOND).forward(request, response);
		}else{
			request.getRequestDispatcher(JspPage.INSTALL_THIRD).forward(request, response);
		}
	}

	
}
