Ask yourself what is a EAR file?
EAR stands for enterprise archive. Similar to WAR which can be deployed to many app servers once built (given the file has that app server's config if need eg
JDBC).
Same goes for EAR file. An EAR file can contain WAR,
EJB JAR, library JAR, and others packed into once.
To access say a WAR file inside the EAR, there usually an application.xml file specifying the mappings what file is for what purpose.