<form action="login.htmls" method="post">
中间省略
</form>
我form的action用相对路径的方式提交到controller层的
其注解写法是:@RequestMapping(value="login.htmls")
可是页面总会多出一个多的目录jsp导致报404(我后台没有创建jsp包)
http://localhost:8080/InvoicingSystem/jsp/login.htmls
注:InvoicingSystem是我的项目名
确实我可以在action里用绝对路径的方式解决,即
action="${pageContext.request.contextPath }/login.jsp"
是的页面地址变成
http://localhost:8080/InvoicingSystem/login.htmls
但是我实在搞不明白为什么用相对路径的方式就是会多出一个/jsp
中间省略
</form>
我form的action用相对路径的方式提交到controller层的
其注解写法是:@RequestMapping(value="login.htmls")
可是页面总会多出一个多的目录jsp导致报404(我后台没有创建jsp包)
http://localhost:8080/InvoicingSystem/jsp/login.htmls
注:InvoicingSystem是我的项目名
确实我可以在action里用绝对路径的方式解决,即
action="${pageContext.request.contextPath }/login.jsp"
是的页面地址变成
http://localhost:8080/InvoicingSystem/login.htmls
但是我实在搞不明白为什么用相对路径的方式就是会多出一个/jsp
