【发布时间】:2019-11-19 12:51:01
【问题描述】:
每当我向服务器发送请求时,它都会在 url 中输入重复的条目。
详细说明请看下面的例子。
@Controller
@RequestMapping("v")
public class ControllerDemo{
@RequestMapping("test")
public String view()
{
return "index.jsp";
}
@RequestMapping("view")
public String view()
{
return "login.jsp";
}
}
第一次请求Url:Https:localhost:8080/v/test 当我从 test.jsp 发出不同的请求时,它会执行以下模式 Https:localhost:8080/v/v/view
在Test.jsp中
<form action="v/view">
//Some data and submit
</form>
它将在 url: https:localhost:8080/v/v/view 中发送请求,而不是 localhost:8080/v/view
如果您需要任何其他信息或项目配置,请告诉我。
【问题讨论】:
标签: spring spring-boot jsp