首页
IT
登录
6mi
u
盘
搜
搜 索
IT
struts path路径问题
struts path路径问题
xiaoxiao
2021-03-25
62
struts2中的路径问题是根据action的路径而不是jsp路径来确定,所以尽量不要使用相对路径。 虽然可以用redirect方式解决,但redirect方式并非必要。
解决办法非常简单,统一使用绝对路径。(在jsp中用request.getContextRoot方式来拿到webapp的路径),或者使用myeclipse经常用的,指定basePath
转载请注明原文地址: https://ju.6miu.com/read-35258.html
技术
最新回复
(
0
)