blob: 6d609d145bc7ad8de06c7cb3937f7ac49a160a65 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<?NLS type="org.eclipse.help.contexts"?>
<contexts>
<context id="lstw1050">
<description>
Specify the <b>Project</b> and <b>Folder</b> where the listener class will be placed. The listener class should be stored in the Java source directory, which you specified when you created the Dynamic Web Project (for example src).
Specify the <b>Java package</b> that the class will belong to. If you do not specify one, the class will be added into a default package. Specify the <b>Class name</b> of the listener (for example MyListener).
In the field <b>Superclass</b> specify the superclass for the listener class,only if your listener class is derived from one. Click <b>Browse</b> to choose from the available, already existing or created, superclasses. (This field is optional).
Note: If you have selected the XDoclet facet when creating the Dynamic Web Project, you can now select <b>Generate a XDoclet annotated class</b>. This will create a XDoclet annotated listener class. The annotations will generate the metadata in the web.xml deployment descriptor.
</description>
<topic label="Creating Listeners" href="../org.eclipse.wst.webtools.doc.user/topics/twlstwiz.html"/>
</context>
<context id="lstw1100">
<description>
From the <b>Servlet Context Events</b> group, you can select any appropriate group of method stubs to be created in the listener file. These are the methods of the two basic listener interfaces, that are provided from the <b>javax.servlet</b> package:
<b>-</b> The <b>ServletContextListener</b> interface is used to listen to the ServletContext life cycle events.
<b>-</b> The <b>ServletContextAttributeListener</b> interface is used to be notified when any attribute is added to the ServletContext or if any of the ServletContext's attributes are changed or removed.
From the <b>HTTP Session Events</b> group, you can select any appropriate group of method stubs to be created in the listener class. These are the methods of the listener interfaces provided from the <b>javax.servlet.http</b> package:
<b>-</b> The <b>HttpSessionListener</b> and <b>HttpSessionActivationListener</b> interfaces are used to listen to creation, invalidation, activation, passivation and timeout of an HttpEvent object.
<b>-</b> The <b>HttpSessionAttributeListener</b> and <b>HttpSessionBindingListener</b> interfaces are used to be notified when any attribute is added to, removed from, or replaced in the HttpSession object.
From the <b>Servlet Request Events</b> group, you can select any appropriate group of method stubs to be created in the listener class. These are the methods of the additional listener interfaces provided from the <b>javax.servlet</b> package:
<b>-</b> The <b>ServletRequestListener</b> interface is used to be notified when a servlet request has started being processed by web components.
<b>-</b> The <b>ServletRequestAttributeListener</b> interface is used to be notified when any attribute is added to, removed from or replaced in the ServletRequest object.
You can click the <b>Select All</b> button to select all available groups of method stubs or click the <b>Clear</b> button to clear all already selected method stubs.
</description>
<topic label="Creating Listeners" href="../org.eclipse.wst.webtools.doc.user/topics/twlstwiz.html"/>
</context>
<context id="lstw1200">
<description>
Note that the Sun Microsystems Java Servlet Specification states that a Servlet class must be <b>public</b> and not <b>abstract</b>. Therefore, you cannot change these modifiers. The only one available for change is the <b>final</b> modifier.
Note that the listener interface of the selected method stubs provided in the previous page of the wizard, is automatically mapped to the Interfaces field on this page. You can click the <b>Add</b> button to add additional interfaces to implement.
If the <b>Inherited abstract methods</b> option is checked, it means that you want to override the methods provided by the interface, which is defined in the <b>Interfaces</b> filed.
Using the option <b>Constructors from superclass</b> you can choose whether to override the constructor of the class, which you specified as superclass in the first page of the wizard. Note: If you did not specify any class as superclass, you can not check this option.
</description>
<topic label="Creating Listeners" href="../org.eclipse.wst.webtools.doc.user/topics/twlstwiz.html"/>
</context>
</contexts>