Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

.EAR files??

 
Poonam Agarwal
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello ranchers,

refering to Enthuware mock , please consider the code below-

Which of the following files possibly contains a web application?

A. webmail.ear
B. webmail.war
C. webmail.jar
D. webmail.xml
E. webmail.xar

given answers A, C.
I have refered HFSJ but i wonder if there is something written about the .ear(Enterprise Archieve) files. Do we expect such questions on exam.

Please verify

Thanks
Poonam
 
Vijitha Kumara
Bartender
Posts: 3914
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EAR (Enterprise ARchive) files can contain web components (WAR), EJBs (EJB-JAR), any other libraries (JAR) and application.xml (of course). It's a standard way of packaging enterprise applications for deployment.
 
swati bannore
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
shouldnt the answer be

A) webmail.ear and B) webmail.war

as jar file usually contains all the libs..
 
Milton Ochoa
Ranch Hand
Posts: 336
Firefox Browser Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with swati
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To answer the poster's question, I'd say that you don't need to know about EAR. Section 2 of the exam objectives is :

Section 2: The Structure and Deployment of Web Applications
* Construct the file and directory structure of a Web Application that may contain (a) static content, (b) JSP pages, (c) servlet classes, (d) the deployment descriptor, (e) tag libraries, (d) JAR files, and (e) Java class files; and describe how to protect resource files from HTTP access.
* Describe the purpose and semantics of the deployment descriptor.
* Construct the correct structure of the deployment descriptor.
* Explain the purpose of a WAR file and describe the contents of a WAR file, how one may be constructed.

I don't think you are supposed to know about EAR. (although it won't hurt to know about it ;) )
 
Poonam Agarwal
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks christophe
 
Sourin K. Sen
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
swati bannore wrote:shouldnt the answer be

A) webmail.ear and B) webmail.war

as jar file usually contains all the libs..


Even I think that only ear and war can contain a complete web app. A jar is usually used to carry 3rd party library although i am not sure if it too can contain a complete web app.

Can someone highlight on this point a bit more ??
 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 3760
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The correct options as shown by the simulator are indeed A and B.
Reference to ear is for the sake of completion. No details of ear are asked in any question.

HTH,
Paul.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic