• Post Reply Bookmark Topic Watch Topic
  • New Topic

"Webapp must not override any class in teh java.* or javax.* namespaces"

 
Himai Minh
Ranch Hand
Posts: 1400
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On p.647 of Head First book,

Option C and D are incorrect because webapp must not override any class in the java.* or javax.* namespace
Option A is correct.


Which statement concerning the container class loader are true?
Option A. web application should not attempt to override container implementation classes.
....
Option C. A web application may override any J2ED classes in javax.* namespace
Option D. A web developer may override J2EE platform classes provided they are not contained in a library JAR within a WAR.


But as I learn, the web application can override :
1. doStartTag() method of javax.servlet.jsp.TagSupport,
2. contextInitialized () method of javax.servlet.ServletContextListener, or
3. doPost method in javax.servlet.HttpServlet...


 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Posts: 2782
174
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Overriding classes in this part of the specs means that you are not allowed to create your own implementation of the classes: you should use the ones that come with the EE-container.

For instance: you are allowed to extend the TagSupport class but you are not allowed to replace the TagSupport class with your own implementation.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!