Ok yes I have a session Bean which interacts with entity beans and pass on the results to the
jsp forms which is using Struts. and these entity & session beans are in jar file. In my ear file I have the jar and war files. To make this ear file, I created a ear module in Eclipse and made changes in Application.xml file like following :
<?xml version="1.0"?>
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN" "http://java.sun.com/j2ee/dtds/application_1_2.dtd">
<application>
<display-name>MyEWS</display-name>
<description>A lomboz generated ear file</description>
<module>
<web>
<web-uri>OnLineDistance.war</web-uri>
<context-root>/OnLineDistance</context-root>
</web>
</module>
<module>
<ejb>MyEWSModule.jar</ejb>
</module>
</application>
this file is in ear module's META-INF directory along with other build files.
I copied the jar and war file into ear Module's directory and then using
Ant with build file created ear file. I don't know If I should mention somewhere about the classpaths for external libraries like Struts which I am using in war file.