现在有两个struts-config.xml,分别是:
web-inf/dir/struts-config.xml
web-inf/struts-config.xml现在有个关于设置的问题,
http://localhost/dir/test.jsp中的html:form,要怎么做才能采用web-inf/dir/struts-config.xml中的设置。就如同
<html:link module="/dir" action="/test">test</html:link>
采用的是web-inf/dir/struts-config.xml

解决方案 »

  1.   

    一般两个配置文件都是放在一个目录下面的,都放在WEB-INF里面,假如这样就直接在web.xml里面配置两个就OK了,
    <init-param>
          <param-name>config</param-name>
          <param-value>/WEB-INF/struts-config.xml,/WEB-INF/struts-config-admin.xml</param-value>
        </init-param>但是假如你的另外一个配置文件在dir/目录下面你就只有试试了,把那个的相对路径加进去,
      

  2.   

    配置已经配置好了,我也可以用web-inf/dir/struts-config.xml了。如果我用<html:link module="/dir" action="/test">test</html:link>的话,已经可以去访问web-inf/dir/struts-config.xml了。我想知道的是,如何才能让html:form的action是从web-inf/dir/struts-config.xml去找。
      

  3.   

    在dir/struts-config.xml里面配置相关的FromBean ,Action就可以了啊和另外的一个struts.config是一样的配置 啊