Storing common files in EAR under glassfish

Common jars like struts.jar, log4j.jar etc can be just dumped under the ear like this:

myapp.ear
struts.jar
log4j.jar
myWebapp.war

You can also club them under the lib directory like this:

myapp.ear
lib
struts.jar
log4j.jar
myWebapp.war

Note that you cannot keep unjarred or expanded classes in EAR. Glassfish won’t pick them up. You’ve to jar them up to work.

More on this at http://java.sun.com/j2ee/verified/packaging.html

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: