• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EPractice Lab mock exam 4 question 15

 
Bartender
Posts: 2418
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Creator of Enthuware JWS+ V6
Posts: 3411
320
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Note to self: don't get into a fist fight with a cactus. Command this tiny ad to do it:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic