[JAVA] Access the war file in the root directory of Tomcat
- Rename the Tomcat ROOT directory
- File export in Eclipse
- Place the war file
Rename tomcat ROOT directory
Rename the ROOT directory under / var / lib / tomcat8 / webapp / to ROOT2
File export in eclipse
- Right click on the project name
- Click Export
- Select Web → war file and Next
- Destination → Reference → Save the file as "ROOT"
Place war file
Place the exported ROOT.war file under / var / lib / tomcat8 / webapp /.
About 10 seconds after placement, a new / var / lib / tomcat / webapp / ROOT directory is automatically created, and the contents of ROOT.war are expanded in it.
- If you delete the ROOT.war file, the ROOT directory will also be deleted automatically.