Reputation: 10530
In my project i see some xmls under src/main/webapp/WEB-INF
while some under src/main/resources
.
Is there any convention what kind of file should go under these location
Upvotes: 6
Views: 2921
Reputation: 384
src/main/resources contains Application/Library resources.
The Servlet 2.4 specification says this about WEB-INF:
A special directory exists within the application hierarchy named WEB-INF. This directory contains all things related to the application that aren’t in the document root of the application. The WEB-INF node is not part of the public document tree of the application. No file contained in the WEB-INF directory may be served directly to a client by the container. However, the contents of the WEB-INF directory are visible to servlet code using the getResource and getResourceAsStream method calls on the ServletContext, and may be exposed using the RequestDispatcher calls.
Upvotes: 5