File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes EAR/WAR/JAR Architecture Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "EAR/WAR/JAR Architecture" Watch "EAR/WAR/JAR Architecture" New topic

EAR/WAR/JAR Architecture

Elle Atechsy
Ranch Hand

Joined: Jan 23, 2004
Posts: 96
Hi All,

Can anyone tell me how code scope within ear & war files? Or, can you tell me where to find the information.

Ex. of what I want to do.

1. Maintain only 1 EAR, but have many WARs that share some common code.
2. Since, multiple WAR files need to use common code, can I place the common code in one WAR's class folder (or is JAR better? if so, where should it be? in the WAR's lib or can it be directly in the EAR, outside of any WARs?)

Thanks for any assistance in Advance.

Justin Chu
Ranch Hand

Joined: Apr 19, 2002
Posts: 209
In the referencing jar/war's META-INF/MANIFEST.MF add the Class-Path entry

[ April 13, 2007: Message edited by: Chu Tan ]
[ April 13, 2007: Message edited by: Chu Tan ]
I agree. Here's the link:
subject: EAR/WAR/JAR Architecture
It's not a secret anymore!