IntelliJ IDEA creates a web project

1. Select File->New->Project...
insert image description here

2. Enter the project name and create a java project
insert image description here

3. Right-click the project and select Add Frameworks Support
insert image description here

4. Select Web Application (4.0)
insert image description here

5. After completion, the project structure becomes like this
insert image description here

6. Create classes and lib folders under WEB-INF
insert image description here

7. Select File->Project Structure... to edit the project structure
insert image description here

8. Change the path of the Output path to the path of the classes folder
insert image description here

9. Add the lib folder to Dependencies to resolve project dependencies (you can put the jra package required by the project under the lib folder path, for example: fastjson-1.1.34.jar)
insert image description here
insert image description here
insert image description here
insert image description here

10. Add web container
insert image description here
insert image description here
insert image description here
insert image description here

11. Configure the web container
insert image description here
insert image description here
insert image description here
insert image description here

12. Run the project
insert image description here

Guess you like

Origin blog.csdn.net/weixin_56175092/article/details/126268041