Where to put struts.xml

后端 未结 6 1817
死守一世寂寞
死守一世寂寞 2021-02-07 04:41

With Struts2 we have to have struts.xml in the class path, so it no longer works to have it under WEB-INF. So the way I got my project to deploy was to stick it und

6条回答
  •  孤街浪徒
    2021-02-07 04:56

    With Struts 1.2, it was required to put the struts-config.xml in the classpath (under WEB-INF folder) but with Struts 2.0, it is required to be in src/main/resources folder.

    See the documentation Struts 2 Documentation here

    I pasted struts.xml in this directory and the project executed fine.

提交回复
热议问题