Where to put struts.xml

后端 未结 6 1824
死守一世寂寞
死守一世寂寞 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 05:16

    In struts 2 projects, struts.xml file is added in src(Java Resources) folder along with the packages and libraries.

    Please refer the image given below.

    Struts 2 project directory view in eclipse

    If u want to know more about struts 2 project structure please visit this link

    Note: In eclipse, you are not allowed to paste a file directly in src folder. So you need to first paste it in any other place in the project( for example, in 'WebContent' folder), then use move functionality to put it in right place( That is 'src' folder).

提交回复
热议问题