读书人

struts 配置文件里 forward 的设置有

发布时间: 2011-12-19 23:23:36 作者: rapoo

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。

读书人网 >J2EE开发

热点推荐