根据端口号(http和https的)跳转到不同的工程
例子:
输入IP+8080(https:8443)跳转到myweb
输入IP+8090(https:8449)跳转到mybms
思路:默认情况只输入ip+port,不输入工程名,则默认走tomcat的webapps下的root工程,走index.xml页面
<html>
<script>
alert(window.location.port);
if(window.location.port == "8080"||window.location.port == "8443")
{
location.href="myweb";
}
else if(window.location.port == "8090"||window.location.port == "8449")
{
location.href="mybms";
}
</script>
</html>