前端路径加/和不加/的区别

例如:http://localhost:8080/sale_war_exploded/h0

在表单中路径

如果sale_war_exploded/h0---------------http://localhost:8080/ch06/sale_war_exploded/h0-------正常

如果/sale_war_exploded/h0--------------http://localhost:8080/sale_war_exploded/h0

解决方法加el表达式${PageContext.request.contextpath}/sale_war_exploded/h0

 

posted @ 2022-04-07 10:43  小魏同学呀  阅读(110)  评论(0)    收藏  举报