日期:2014-05-20  浏览次数:20651 次

struts 配置文件里 forward 的设置问题
请教大家
我在网上看到 可以在struts的配置文件里 设置 forward 的contextRelative="true" 
但是我写进去, 为什么他就说找不到contextRelative
我是struts1.3

<action path="/adminClass1" 
  parameter="method"
  type="com.net.struts.action.AdminClass1Action">
  <forward name="index" path="/index.jsp" contextRelative="true" />
</action>
 
就这样写,他就说 Attribute "contextRelative" must be declared for element type "forward".

为什么?????

------解决方案--------------------
struts 1.3 forward中已经没有contextRelative属性了
------解决方案--------------------
contextRelative设为true时表示当前path属性以/开头时,给出的是相对于当前上下文的url。