request.getContextPath()笔录

<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String qxglPath = request.getScheme()+"://"+request.getServerName()+":"+"7300"+"//qxgl/CtrlUser?action=login&surl=IndexFrame.jsp&furl=LoginError.jsp";
String zhibiaoPath = request.getScheme()+"://"+"10.224.141.208"+":"+"7100";
String qxglPathXS  = request.getScheme()+"://"+"10.224.141.208"+":"+"7300"+"//qxgl/CtrlUser?action=login&surl=IndexFrame.jsp&furl=LoginError.jsp";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>My JSP 'index.jsp' starting page</title>
  </head>
  <body>
    This is my JSP page. <br>
 	<a href="<%=qxglPathXS%>">权限</a>
 	<a href="<%=zhibiaoPath%>">指标查询</a>
	<a href="<%=basePath %>">当前path</a>
  </body>
</html>


 

weblogic发布 web发布

你可能感兴趣的:(java,html,jsp,String,Path,import)