Struts2_path

Struts2中的路径问题是根据action的路径而不是jsp路径来确定。所有要使用的是绝对路径

绝对路径有两种方式:

<a href ="index.jsp" >index.jsp</a>

<a href = <%=basePath%>>index.jsp</a>

 如下图:

第一种方式建立在 <base href="" /> 的标签基础上

这个是MyEclipse自动生成的

 

posted @ 2015-11-13 11:04  万年乡巴佬  阅读(124)  评论(0编辑  收藏  举报