1

I want to create a single war file from multiple dynamic web project. Example my first project's WebContents folder data should be merge with the second project's WebContents folder data.

Like suppose from first project "login.jsp" file and from second project "welcome.jsp" file should be merge into a single war file. I am using eclipse, is this possible to create a single war file from multiple dynamic web project, if yes please suggest me some point regarding the same or is there any another way to achieve this.

Akshay
  • 91
  • 1
  • 9
  • 1
    Read this - http://stackoverflow.com/questions/31020038/how-can-i-add-war-file-to-another-java-web-application-dependencies – voucher_wolves Jan 17 '17 at 06:39

1 Answers1

0

You might try using Web Fragment projects with a core Dynamic Web project instead. The New Web Fragment project wizard will create a META-INF directory within the default Java Source Folder. Create a resources folder inside of that, and its contents will be available from the root of the deployed web-app. You can add and remove fragments from the deployment using the Deployment Assembly property page on the Dynamic Web Project, just as you would with any other kind of Java Project.

See https://blogs.oracle.com/alexismp/entry/web_inf_lib_jar_meta for some guidance on how it works, if you don't want to dive into that part of the Java EE and Servlet specs.

nitind
  • 19,089
  • 4
  • 34
  • 43