/**
 * Copyright (c) 2003-2004 System Integrator Corporation.
 *                 All Rights Reserved.
 */
package jp.co.sint.servlet.mobile.imode;

import java.io.IOException;

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

import jp.co.sint.config.SIConfig;
import jp.co.sint.servlet.SIServlet;

import org.apache.log4j.Category;
import jp.co.sint.tools.SIURLParameter;//7.1.1 ST0236 追加

/**
 * @version $Id: SIIMainSrv.java,v 1.0 2003/12/22 Exp $
 * @author  Jinwang Chen
 * <br>Description:
 * <p>History</p>
 * <p>Author&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Date&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reason</p>
 *  ============&nbsp;&nbsp;&nbsp;==========&nbsp;&nbsp;===========================<br>
 * Jinwang Chen   2003/12/22 14:08:43  Original
 */
public class SIIMainSrv extends SIServlet{
  //ログ用のインスタンスの生成
  private static Category log=Category.getInstance(SIConfig.SILOG4J_WEBSHOP_CATEGORY_NAME);

  /**
   * <b>doUpdate</b>
   * HTTP リクエストの処理
   * @param  request　リクエスト
   * @param  response
   * @return なし
   * @throws ServletException
   * @throws IOException
   */
  public void doUpdate(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
    HttpSession session=request.getSession(true);//セッションの取得
	SIURLParameter urlParam = new SIURLParameter(request);//7.1.1 ST0236 追加
	
	String actionName=this.getActionName(urlParam);//画面からのアクション	//7.1.1 ST0236 修正
	String editMode=this.getEditMode(urlParam);//DBへの編集モード	//7.1.1 ST0236 修正

    if (this.getServletPath(request).equals("/mobile/i/mallcompany")){//モール情報
      forwardKey(request,response,"webshop.jsp.front.imode.mall.company");
    }else if (this.getServletPath(request).equals("/mobile/i/mallexrule")){//特定商取引法
		  forwardKey(request,response,"webshop.jsp.front.imode.mall.exrule");
	  }else if (this.getServletPath(request).equals("/mobile/i/mallprivacy")){//プライバシー
		  forwardKey(request,response,"webshop.jsp.front.imode.mall.privacy");
    }else if (this.getServletPath(request).equals("/mobile/i/howto")){//ご利用方法
      forwardKey(request,response,"webshop.jsp.front.imode.howto");
    }else{
      forwardKey(request,response,"webshop.jsp.front.imode.main");
    }
  }
}
