This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
a. Can the listener class have a non default constructor and an unaccessible default constructor (say provat etc.). In this case how would the listener code get fired?
Hi, The listener class cannot have an unaccessible default constructor, I think it is because the container uses Reflection to instantiate the class, In case of tomcat , the application intialization itself fails , with the following message.
java.lang.IllegalAccessException: Class org.apache.catalina.core.StandardContext can not access a member of class com.example.ReqAttrListener with modifiers "private"