我怎样才能link到另一个文件夹的网页?

How can I link to a web page of another folder?

我的目录树如下

WebContent(Folder)
      |
      |_____home.jsp(Page)
      |_____User(Folder)
                |
                |_____________deposit.jsp(Page)

下面是我的 deposit.jsp 页面 deposit.jsp

<%@ 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>
    user deposit
    <a href="~/home.jsp">home</a>
</body>
</html>

但是它不能去 SendMail.jsp page.So 我怎么能 link 从 deposit.jsp 到 home.jsp?

您可以更改 deposit.jsp 页面,因为 follows.It 会 运行 正确。

<%@ 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>
    user deposit
    <a href="${pageContext.request.contextPath}/home.jsp">home</a>
</body>
</html>