0

我有一个/views/home/index.jsp,它有一个链接可以从另一个控制器调用另一个页面。

views/home/index.jsp ( http://localhost:8080/mywebsite/home<- 这个控制器/方法调用“home/index”)

<li><a href="${pageContext.request.contextPath}/home2" target="_blank">home2</a></li>

home.index 需要重定向到的页面由 home2 控制器托管:

views/home2/index.jsp ( http://localhost:8080/mywebsite/home2<- 这个控制器/方法调用“home2/index”)

而不是使用:

href="${pageContext.request.contextPath}/home2" 

我怎样才能为链接使用相关的东西,例如:

href="/home2"
4

1 回答 1

0

每个@Atais:

“只是没有斜线?所以它将解析 localhost:8080/mywebsite/home2 地址”

于 2013-08-06T18:23:35.583 回答