<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@page import="org.apache.commons.lang3.StringUtils"%>
<%@page import="com.eactive.eai.rms.common.login.SessionManager"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
  <head>
	<script language="javascript" src="<c:url value="/js/jquery-1.12.1.min.js"/>"></script>
   	<script language="javascript">
   	  var contextPath = "<%=request.getContextPath()%>";
   	  var serviceType = localStorage["serviceType"];
   	  var mainUrl = contextPath + "/main.do";
   	  if (serviceType) {
   		mainUrl += "?serviceType=" + serviceType;
   	  }

   	  <% if (StringUtils.isNotBlank(SessionManager.getUserId(request)) || StringUtils.isNotBlank(SessionManager.getRoleIdString(request))) { %>
   	    window.location.replace(mainUrl);
   	  <% } else { %>
   	    window.location.replace(contextPath + "/loginForm.do");
   	  <% } %>
   	</script>
  </head>
</html>