• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EPractice Lab mock exam 4 question 15

 
Himai Minh
Ranch Hand
Posts: 1361
7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Which package can be used for storing helper and utility classes of a Java EE web application?
A. under the document root directory of the web application.
B. WEB-INF/classes
C. WEB-INF
D. WEB-INF/lib
E. The same directory where the WAR file is placed.
Given answer is B.
Any loose classes such as servlet classes or utility classes should be placed in /WEB-INF/classes/ directory. Hence choice B is correct.
Choice A is incorrect as anything under document root directory is 'served' to the client.
Choice C is incorrect as only the dd goes here. Any classes deployed here will not be available to the application class loader.
Choice D is incorrect as WEB-INF/lib should be used for deploying jar files.
Choice E is incorrect as the deployment system considers only the WAR file for deploying and does not consider any unpacked classes placed in the same directory.


I think the answer can also be D if the utility classes are in jar.
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2536
113
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the answer can also be D if the utility classes are in jar.

Yes, I agree, D is also correct.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic