Page 1 of 1

About Question enthuware.jwpv6.2.797 :

Posted: Sat Jan 26, 2013 1:54 pm
by harsh.sahajwani
Option 1 seems to be incorrect, but it is shown as correct in ETS. Please, explain how is it possible?

Re: About Question enthuware.jwpv6.2.797 :

Posted: Sun Jan 27, 2013 7:50 am
by admin
The specification is not very clear on this point. It is possible to use the same class name in two listner elements, for example:

Code: Select all

    <listener>
        <description>ServletContextListener</description>
        <display-name>name 1</display-name>
        <listener-class>com.enthuware.jwebplus.MyWebListener</listener-class>
    </listener>
    <listener>
        <description> HttpSessionListener</description>
        <listener-class>com.enthuware.jwebplus.MyWebListener</listener-class>
        <display-name>name 2</display-name>
    </listener>    
However, it is not clear from the specification whether the container should create only one instance or two instances in this case.