Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • 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: 1361
7
  • 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
Pie
Posts: 2534
113
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic