B station video steps
1. First choose to open the project
2. After opening, it will look like this, only displaying the eclipse files of .classpath and .project
3. Open the project structure
4. Click modules in the project structre, then click the + sign, select import module, and select the location of the folder
5. Select eclipse and click next
6. Select keep project and module files in, and then continue to click next
7. Select the project name and click next
8. Click finish, then click yes
9. Delete the red report option (select it, then click the - sign)
10. Add lib, click the libraries in the project structre, click + to select Java, and then select the lib folder in the project, which is usually in the WEB-INF folder in web or webcontent.
11. Add the newly added lib in Dependecies in Modules, and then add the tomcat server. After going out, remember to select lib and Tomcat as shown in the third picture below
12. Add Web in Facets
13. Delete all the two you already have, such as deleting the ones that have been circled in the figure below
14. Add the web.xml file in the project and the folder where the Web is stored. Generally, web.xml is in the project name\WebContent\WEB-INF\web.xml, and the folder where the web is stored is generally in the webcontent or web folder
15. Click artifacts, click the + sign, then select web application exploded, then select from modules, and select the project just now
16. Click apply first, then click ok
17. To build a table in the database, first find the applicationContext.xml file or druid.properties configuration in the project, build a table according to the table name and modify the database login verification information
18. Open navicat, create the relevant library name, place the mouse on the corresponding library name, right-click to run the SQL file, then find the .sql file, import the database, and refresh to view the import results
19. Finally, deploy the project on tomcat
Click deployment to add artifact, select the project just now
20. Change the application context to /project name
21. Then click server, and other configurations can be set according to the following figure
22. Finally, start the project, click the small green icon in the upper right corner
23. In this way, the service starts
other considerations
If port 1099 is occupied when starting the Tomcat server (below)
Solution steps:
1. Win+r opens the input cmd to open the black window
2. Enter netstat -aon|findstr 1099 to find the process that occupies the port
3.taskkill -f -pid 16988 (process number)
This will start Tomcat normally.