File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes reference external war file from enterprise project Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "reference external war file from enterprise project " Watch "reference external war file from enterprise project " New topic

reference external war file from enterprise project

Ramesh Krishna

Joined: May 17, 2004
Posts: 25
hi all,

we are greatfull for your valuable response

we are developing an project using j2ee & WSAD 5.1.1, we have a reusable module,which will be used in future appl's which has been packaged separately into
1) applicationclient.jar
2) Ejb.jar
3) web.war

currently we are developing an enterprise appln in which we want to use these above said files.......

our current status is that.......

we have placed ApplicationClient.jar and Ejb.jar in Enterprise Project and we are able to use them via classpath...

our current problem is........

we want to achieve the same thing for web.war also, so we request you to guide on how best this situation can be handled

note: we are using Struts frame work for front web.war will also have it's own Struts-config.xml file and web.xml.


Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33132

To make sure I'm understanding correctly, it sounds like you want to use the same war and change the configuration files?

If you didn't need to change the config files, you would be able to just associate your project with the second enterprise app.

Unfortunately there isn't a clean way to reuse the wars (or any other project) and change settings. First, I recommend getting as much out of the war as possible. Take all the Java code and put it in another project. This at least minimizes the version control problems. For the rest of the war, you will have to make a copy.

Another alternative is to create a branch in the repository for the second applicatio (with the same project name.) However, this is even harder to maintain than the separate projects.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: reference external war file from enterprise project
It's not a secret anymore!