struts-configxml中contextRelative=true是什么

struts-configxml中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

posted @ 2008-11-10 17:29  陆陆通通  阅读(172)  评论(0编辑  收藏  举报