You never said which version of JBoss AS so I will assume 5.0.x or 5.1.0. Create a 'lib' directory within the EAR and place the common JAR there. Here's and example EAR file layout:
There is no need to reference the common.jar in application.xml (unless you are not using AS 5.x...)
yes. we use JBoss 5.0.1.GA.
Thanks for help.
The two web modules share some css and java scripts files. Can we put them in a common place? Right now they are in each web module war file.
How about jsp files? for shared jsp files, can they be put in common place too?
I don't think that would be possible because the jsp, .js and css belong to a web application "context". So whenever you request those resources they are looked for within that context. And since each web app has its own context, you probably wont be able to share this.