我试图从我的JSP页面创建到外部资源的链接,但是它总是将servlet的名称添加为前缀。这是我的页面:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<a href="www.google.com">Link</a>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
当我转到http://localhost:8080/Example/example.jsp然后按链接时,我转到以下URL http://localhost:8080/Example/www.google.com而不是www.google.com。
请帮我解决。
| 归档时间: |
|
| 查看次数: |
4285 次 |
| 最近记录: |