Reputation: 465
In a Spring 'Maven' project, where to place web.xml file?
I am creating a spring mvc project and not sure about where to put web.xml in the project.
Upvotes: 2
Views: 7415
Reputation: 331
web.xml file is always inside WEB-INF folder, by default Maven is expecting it in there and its the first location that is being searched for a web.xml file.
Upvotes: 0
Reputation: 303
it's WEB-INF/web.xml Check out the below link ref: https://docs.oracle.com/javaee/5/tutorial/doc/bnadx.html No matter how your archetype structures the project, the final build always follow the specifications. I know the frameworks like spring hides all the specification details and nowadays newbies don't pay attention to all such details. Well knowing specifications and how the frameworks are constructed over these specifications adds value to your software development skills.
Upvotes: 1
Reputation: 2805
This is an example of a structure of Spring project with maven
├── src
│ └── main
│ ├── java
│ │ └── com
│ │ └── hellokoding
│ │ └── hello
│ │ └── web
│ │ └── YourClass.java
│ ├── resources
│ │ ├── application.properties
│ │ └── logback.xml
│ └── webapp
│ ├── resources
│ │ ├── css
│ │ │ └── bootstrap.min.css
│ │ ├── images
│ │ └── js
│ │ └── bootstrap.min.js
│ └── WEB-INF
│ ├── views
│ │ └── hello.jsp
| ├── appconfig-mvc.xml
│ ├── appconfig-root.xml
│ └── web.xml
└── pom.xml
From here
Upvotes: 5