天天看点

<base href=

<base href=""/> 的应用

以前页面有这样的

1

<

a

href="<%=path%>/manager/login_toLogin.do">我要去登录</

a

>

2

3

4

5

6

7

8

9

10

11

12

13

14

<%@ page language=

"java"

import

=

"java.util.*"

pageEncoding=

"UTF-8"

%>

<%

String

path = request.getContextPath();

String

basePath = request.getScheme()+

"://"

+request.getServerName()+

":"

+request.getServerPort()+path+

"/"

;

%>

<!DOCTYPE HTML PUBLIC 

"-//W3C//DTD HTML 4.01 Transitional//EN"

>

<html>

<head>

<base href=

"<%=basePath%>"

/>

<meta http-equiv=

"Content-Type"

content=

"text/html; charset=utf-8"

/>

<title>登录管理平台</title>

<link href=

"dwz/themes/css/login.css"

rel=

"stylesheet"

type=

"text/css"

/>

</head>

<

a

href

=

"manager/login_toLogin.do"

>我要去登录</

a

>