I'm trying to develop a new java web application from scratch. I'm using the IntelliJ IDE, and maven build tool.
- Why servlets can be created only under the resources folder ?
- Why jsp filels can be created only under the webapp folder?
Thanks
I'm trying to develop a new java web application from scratch. I'm using the IntelliJ IDE, and maven build tool.
Thanks
Sounds like you need to do some research into how Maven is building your project.
You should create servlets under src/main/java
folder.
Run the maven build and then explore the generated WAR file, this way you can get an idea of how Maven is structuring the project.
You should see the that the webapp folder is in fact simply deployed at the root of the WAR file, hence your JSPs are placed in the correct location.
Thanks everybody, but i resolved the issue myself.
The Solution: