Eclipse WAR with 2 projects?

后端 未结 2 1281
日久生厌
日久生厌 2021-01-13 18:38

I am trying to export a WAR file from Eclipse. I have a \"Dynamic Web Project\". But I need classes created for two other projects, one a plain Java project, the other anoth

2条回答
  •  灰色年华
    2021-01-13 19:09

    Packing together different projects for deployment is achieved through an EAR file (enterprise archive). An EAR may combine multiple web projects (WAR), Enterprise JavaBeans projects (JAR), standard JARs, etc. and packs it into a single application.

    Create a new EAR project in Eclipse, open its properties and check all dependencies on the Java EE Module Dependencies page. After that export the project as an EAR and deploy it.

提交回复
热议问题