The JavaWeb project depends on another Java project, and an error occurred when publishing the tomcat server: The subcontainer failed to start, and the component [StandardEngine[Catalina] could not be started)

The JavaWeb project depends on another Java project, which is divided into two steps:

The first step is to set the compilation path of the project when compiling:

Select Add in the Projects tab to add the projects you want to depend on.

Then select Libraries selection card

 

 Select Add Class Folder to add the /bin directory of the dependent project.

After setting this step, you can compile successfully and find all dependent classes.

The second step, when publishing to the tomcat server:

Open the project's Properties, select Deployment Assembly, and then Add the dependent project

 Add, select Project, find the dependent project, and add it. In this way, the dependent code can be published to the server, and the JavaWeb project can run correctly on the server.

Guess you like

Origin blog.csdn.net/anfenggang/article/details/131863202