`
lijun87
  • 浏览: 263783 次
  • 性别: Icon_minigender_1
  • 来自: 武汉
社区版块
存档分类
最新评论

struts-config.xml中contextRelative

阅读更多

struts-config.xml中contextRelative=true是什么意思,主要是实现什么功能...

 

 

如果当前路径为http://localhost/moduleA/
<forward name="..." path="/target.jsp" redirect="true" contextRelative="false"/>
执行以上forward时会转向http://localhost/moduleA/target.jsp
如contextRelative="true"时,会转向http://localhost/target.jsp
在struts1.1以上,通常使用module="/moduleA"代替

 

contextRelative    设为true时表示当前path属性以/开头时,给出的是相对于当前上下文的url。默认为false

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics