1. If a task requires specific knowledge of the current application, does the code for the taks belong in the controller helper or helper base? 2. If a task only requires knowledge that is common to all controllers, does the code for the taks belong in the controller helper or helper base? 3. What is the benefit of adding JAR files to a web application? 4. In a web application, why is it a bad idea to write debugging statements that use System.out? 5. What is the name of the package that adds logging to a web application? 6. List the five values that can be used to set the log level for a file. 7. List the five error message methods that can be used to write messages to a log file. 8. If a file has a level of Level.WARN, which error methods will write to the file? 9. If a message is written with the warn method, which log file levels will write the message to the log file? 10. Which error message can never be ignored? 11. Which of the error methods should be used to write debugging messages? 12. Which of the error methods should be used to write messages that indicate there is a significant problem in the application? 13. What is an advantage to using a servlet to initialize Log4j. 14. What does the getRealPath method do? 15. What is the purpose of an initialization parameter in the web.xml file? 16. What is the advantage of using an initialization parameter in web.xml to set the location of the log file for an application? 17. Name the tags that are needed in web.xml to define an initialization parameter. 18. Write the XML to declare an initialization parameter named Credits with a value of 120. 19. What is the name of the HttpServlet method that reads in initialization parameter from the web.xml file? 20. What is the purpose of the root logger? 21. What is the purpose of an Appender? 22. What methods are used to create a new logger or retrieve an existing logger? 23. What is the name of the method that sets the level of a logger? 24. What is the purpose of the HttpServlet Init method? 25. When is the HttpServlet Init method called? 26. Summarize what steps are taken in the Init method for the Log4j servlet. 27. Why doesn't the Log4j servlet have a doGet method? 28. When is a servlet loaded into memory? 29. The log4j servlet does not have a doGet method, so it cannot be accessed by the user. How is the log4j servlet loaded into memory? 30. Write the XML code that will force the InitLog4j servlet to be loaded into memory when Tomcat is started. 31. What is the advantage of placing the HelperBase class in a separate package than the package for the application? 32. Why is the logger member variable added to the HelperBase class? 33. Why use an initialization parameter to set the name of the logger in the HelperBase? 34. Which member variable in the HelperBase is needed in order to retrieve the initialization parameter from the web.xml file? 35. Name the init parameters that are used in the HelperBase. 36. Summarize the steps that are done in the initLogger method in the HelperBase. 37. How is the logger member variable used to write messages to the log file? 38. Summarize the steps that must be followed in order to add a logger to a bean. 39. Explain how hidden fields can be eliminated from an application. 40. What does it mean to be an abstract method? 41. What does it mean to be an abstract class? 42. When does Java determine which method to execute when the addHelperToSession method calls copyFromSession? 43. What is the purpose of the 'name' parameter in the addHelperToSession method. 44. What is the purpose of the 'state' parameter in the addHelperToSession method. 45. Summarize what the addHelperToSession method does. 46. What are the values for the SessionData enumeration? 47. When should the data in the session be ignored? 48. Summarize what the copyFromSession method does. 49. Why does the addHelperToSession method use an abstract method to copy data from the session? 50. Why is the copyFromSession method defined in the controller helper? 51. Why is the addHelperToSession method defined in the helper base? 52. What is the code that belongs in the doGet method to add the helper to the session with the name 'info' and copy the data from the session into the bean? 53. What is the code that belongs in the doGet method to add the helper to the session with the name 'assist' and ignore the data from the session? 54. What is the advantage of using a helper method to specify the location of the JSPs? 55. Write the return value from the jspLocation method if the JSPs are in the visible folder where the servlet is mapped. 56. Write the return value from the jspLocation method if the JSPs are in a visible folder named /ch3/new/location. 57. Write the return value from the jspLocation method if the JSPs are in the same folder as a servlet in a package named ch3.new.location. 58. Write the return value from the jspLocation method if the JSPs are in a hidden folder named /ch3/new/location, but not in the same package as the controller. 59. What is the advantage of placing the JSPs in the same package as the controller? 60. What are the advantages of placing the JSPs in a hidden folder, but not in the same package as the controller? 61. Why is it better to use a separate helper method that contains the code to be executed when a button is clicked? 62. What is the purpose of the ButtonMethod annotation? 63. Where must the ButtonMethod annotation be placed? 64. What are the names of the two parameters to the ButtonMethod annotation? 65. What does the buttonName parameter in the ButtonMethod annotation have to match? 66. What is the purpose of the isDefault parameter in the ButtonMethod annotation? 67. What is the name of the new helper base method that does the work of the controller logic (if .. else block) in a controller helper? 68. Looking at the code for the executeButtonMethod method, identify the code that tests if a button is in the query string. 69. Does the executeButtonMethod method belong in the HelperBase or the ControllerHelper? Why? 70. What are the names of the Jar files that are needed to fill the bean automatically? 71. What is the naming convention that must be used in order for the BeanUtils package to be able to fill the bean automatically? 72. What is the name of the method from the BeanUtils package that will automatically fill the bean? 73. Does the fillBeanFromRequest method belong in the HelperBase or the ControllerHelper? Why? 74. When should the fillBeanFromRequest method be called? 75. What is the return value for the jspLocation for the ch4.enhanced controller helper? What does this value signify? 76. How many button methods are there in the ch4.enhance controller helper? How many are specified as a default? 77. Write the code for the entire doGet method in the ch4.enhanced controller helper. 78. What other files would need to be changed if the word "helper" was replaced with "info" in the addHelperToSession method? 79. The method copyFromSession is not called from within the controller helper class. Where is the call to copyFromSession made? 80. Write the code for the complete ch4.enhanced Controller. 81. Write the XML for the ch4.enhanced Controller. Include two init params for logName and logLevel.