[216734] Infopops for Filter and Listener wizards
diff --git a/docs/org.eclipse.jst.servlet.ui.infopop/FilterWizContexts.xml b/docs/org.eclipse.jst.servlet.ui.infopop/FilterWizContexts.xml
new file mode 100644
index 0000000..25bf23c
--- /dev/null
+++ b/docs/org.eclipse.jst.servlet.ui.infopop/FilterWizContexts.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?NLS type="org.eclipse.help.contexts"?>
+
+
+<contexts>
+<context id="fltw1050">
+<description>
+A filter is used to give you access to the HttpServletRequest and the HttpServletResponse objects before they are passed into a servlet.
+
+Specify the <b>Project</b> and <b>Folder</b> where the filter class will be placed. The filter 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 filter (for example MyFilter).
+
+In the field <b>Superclass</b> specify the superclass for the filter,only if it is derived from one. Click <b>Browse</b> to choose from the available, already existing or created, superclasses. (This field is optional).
+
+Check <b>Use existing Filter class</b> and you could get an already existing class and it will be registered automatically in your web.xml.
+
+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 filter class. The annotations will generate the metadata in the web.xml deployment descriptor.
+</description>
+<topic label="Creating Filters" href="../org.eclipse.wst.webtools.doc.user/topics/twfltwiz.html"/>
+</context>
+
+<context id="fltw1100">
+<description>
+Note that the Class Name value provided in the first page of the wizard is automatically mapped to the <b>Name</b> field on this page. 
+
+Specify the <b>Initialization Parameters</b> of the filter as name/value pairs (for example passwords).
+
+In the <b>Filter Mappings</b> field, specify the Servlet, to which the filter will be mapped. Do this by clicking the <b>Add</b> button. In the <b>Add filter mapping</b> dialog that appears after you click the <b>Add</b> button, if you select the <b>Servlet</b> radio button you can choose an existing servlet class, but if you select the <b>URL Pattern</b> radio button you have to enter the URL pattern to which you want to map the filter. In the same dialog, but from <b>Select Dispatchers</b> group, you can choose which dispatchers to be invoked in the deployment descriptor. The dispatcher has four legal values: FORWARD, REQUEST, INCLUDE, and ERROR. 
+ <b>-</b> A value of <b>FORWARD</b> means the Filter will be applied under <b>RequestDispatcher.forward()</b> calls.
+ <b>-</b> A value of <b>REQUEST</b> means the Filter will be applied under ordinary client calls to the <b>path</b> or <b>servlet</b>.
+ <b>-</b> A value of <b>INCLUDE</b> means the Filter will be applied under <b>RequestDispatcher.include()</b> calls.
+ <b>-</b> A value of <b>ERROR</b> means the Filter will be applied under the error page mechanism.
+ <b>-</b> If no despatcher is selected, it indicates that filters will be applied only under ordinary client calls to the <b>path</b> or <b>servlet</b>.
+</description>
+<topic label="Creating Filters" href="../org.eclipse.wst.webtools.doc.user/topics/twfltwiz.html"/>
+</context>
+
+<context id="fltw1200">
+<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. 
+
+A filter class must implement the Filter interface, that's why the <b>javax.servlet.Filter</b> is provided as the default Interface. You can also add additional interfaces to implement. Click <b>Add</b> to open the <b>Interface Selection</b> dialog. In this dialog, as you type the name of the interface that you are interested to add, there will be displayed only the interfaces that match the pattern.
+
+Note: Because the methods init, doFilter and destroy are provided from javax.servlet.Filter interface and this interface is obligatory for each Filter class, the option <b>Inherited abstract methods</b> is always checked and can't be changed.
+
+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 Filters" href="../org.eclipse.wst.webtools.doc.user/topics/twfltwiz.html"/>
+</context>
+
+</contexts>
diff --git a/docs/org.eclipse.jst.servlet.ui.infopop/ListenerWizContexts.xml b/docs/org.eclipse.jst.servlet.ui.infopop/ListenerWizContexts.xml
new file mode 100644
index 0000000..6d609d1
--- /dev/null
+++ b/docs/org.eclipse.jst.servlet.ui.infopop/ListenerWizContexts.xml
@@ -0,0 +1,50 @@
+<?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>
diff --git a/docs/org.eclipse.jst.servlet.ui.infopop/ServletWizContexts.xml b/docs/org.eclipse.jst.servlet.ui.infopop/ServletWizContexts.xml
index 3cc4194..8942b51 100644
--- a/docs/org.eclipse.jst.servlet.ui.infopop/ServletWizContexts.xml
+++ b/docs/org.eclipse.jst.servlet.ui.infopop/ServletWizContexts.xml
@@ -12,28 +12,50 @@
  *******************************************************************************/ -->
 <contexts>
 <context id="srvw1050">
-<description>Specify the project and folder where the servlet class will be placed. The servlet class should be stored in the Java source directory that you specified when you created the dynamic Web project, for example src. 
-Specify the package that the class will belong to (it is added into a default package if you do not specify one), and the class name of the servlet, for example HelloServlet.
-Specify a superclass for the servlet class. A servlet created by this wizard can have HttpServlet, or any class that has HttpServlet in its hierarchy as its superclass. Click Browse to choose from the available superclasses.
-Select the Generate an annotated servlet class check box, and it will create a default annotated servlet class for you. The annotations will be used to generate the artifacts. 
+<description>
+Specify the <b>Project</b> and <b>Folder</b> where the servlet class will be placed. The servlet class should be stored in the Java source directory that you specified when you created the Dynamic Web Project (for example src). 
+
+Specify the <b>Java package</b> that the class will belong to (it is added into a default package if you do not specify one).
+
+Specify the <b>Class name</b> of the servlet (for example HelloServlet).
+
+In the field <b>Superclass</b> specify a superclass for the servlet class. A servlet created by this wizard can have HttpServlet, or any class that has HttpServlet in its hierarchy as its superclass. Click <b>Browse</b> to choose from the available superclasses.
+
+Check <b>Use existing Servlet class</b> and you could get an already existing class and it will be registered automatically in your web.xml.
+
+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 servlet class. The annotations will generate the metadata in the web.xml deployment descriptor.
 </description>
-<topic label="Creating servlets" href="../org.eclipse.wst.webtools.doc.user/topics/twsrvwiz.html"/>
+<topic label="Creating Servlets" href="../org.eclipse.wst.webtools.doc.user/topics/twsrvwiz.html"/>
 </context>
 
 <context id="srvw1100">
-<description>Note that the Class Name value provided in the first page of the wizard is automatically mapped to the Name field on this page. 
-Specify the initialization parameters of the servlet as name/value pairs, for example passwords.
-In the URL mapping field, specify the URL string to be mapped with the servlet.</description>
-<topic label="Creating servlets" href="../org.eclipse.wst.webtools.doc.user/topics/twsrvwiz.html"/>
+<description>
+Note that the Class Name value provided in the first page of the wizard is automatically mapped to the <b>Name</b> field on this page. 
+
+Specify the <b>Initialization Parameters</b> of the servlet as name/value pairs, for example passwords.
+
+In the <b>URL Mappings</b> field, specify the URL pattern to be mapped with the servlet.
+</description>
+<topic label="Creating Servlets" href="../org.eclipse.wst.webtools.doc.user/topics/twsrvwiz.html"/>
 </context>
 
 <context id="srvw1200">
-<description>Select a modifier to specify whether your servlet class is public, abstract, or final. (Classes cannot be both abstact and final.)
- The javax.servlet.Servlet is provided as the default Interface. You can also add additional interfaces to implement. Click Add to open the Interface Selection dialog. In this dialog, as you type the name of the interface that you are interested in adding in the Choose interfaces field, the list of available interfaces listed in the Matching types list box updates dynamically to display only the interfaces that match the pattern. 
-Select any appropriate method stubs to be created in the servlet file. The stubs created by using the Inherited abstract methods option must be implemented if you do not intend to create an abstract servlet. This is not true for Constructors from superclass.
-</description>
-<topic label="Creating servlets" href="../org.eclipse.wst.webtools.doc.user/topics/twsrvwiz.html"/>
-</context>
+<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.  
 
+If one of the HttpServlet or GenericServlet classes is not specified as a superclass of the Servlet class, the <b>javax.servlet.Servlet</b> is provided as the default interface and defines life cycle methods. You can use the wizard to add additional interfaces to implement.Click <b>Add</b> to open the
+<b>Interface Selection</b> dialog. In this dialog, as you type the name of the interface that you are interested in adding in the <b>Choose interfaces</b> field, the list of available interfaces listed in the <b>Matching items</b> list box updates dynamically to display only the interfaces that match the pattern. 
+
+When the <b>Inherited abstract methods</b> option is checked you can select which methods, provided by HttpServlet class, to be overridden. The available methods are:
+  - <b>init, service and destroy</b> which carries of the servlet's life cycle; 
+  - <b>getServletConfig and getServletInfo</b>, which returns respectively servlet's ServletConfig object containing initialization and startup parameters and information about the current servlet;  
+  - the six <b>doXXX</b> that get called when a related HTTP request method is used. 
+
+Note: If you did not specify HttpServlet class as superclass in the first page of the wizard, the option <b>Inherited abstract methods</b> is always checked and can not be changed, because each servlet must implement the methods of the javax.servlet.Servlet interface: init, service, destroy, getServletConfig and getServletInfo.   
+
+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 Servlets" href="../org.eclipse.wst.webtools.doc.user/topics/twsrvwiz.html"/>
+</context>
 
 </contexts>
diff --git a/docs/org.eclipse.jst.servlet.ui.infopop/plugin.xml b/docs/org.eclipse.jst.servlet.ui.infopop/plugin.xml
index 1720114..aff6d1f 100644
--- a/docs/org.eclipse.jst.servlet.ui.infopop/plugin.xml
+++ b/docs/org.eclipse.jst.servlet.ui.infopop/plugin.xml
@@ -19,8 +19,16 @@
 <extension point="org.eclipse.help.contexts">
       <contexts file="ServletWizContexts.xml" plugin ="org.eclipse.jst.servlet.ui"/>
    <contexts file="DynWebWizContexts.xml" plugin ="org.eclipse.jst.servlet.ui"/>
+   <contexts
+         file="ListenerWizContexts.xml"
+         plugin="org.eclipse.jst.servlet.ui">
+   </contexts>
+   <contexts
+         file="FilterWizContexts.xml"
+         plugin="org.eclipse.jst.servlet.ui">
+   </contexts>
 
 </extension>
 
 
-</plugin>
\ No newline at end of file
+</plugin>
diff --git a/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/IWebUIContextIds.java b/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/IWebUIContextIds.java
index 1d09676..db615f3 100644
--- a/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/IWebUIContextIds.java
+++ b/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/IWebUIContextIds.java
@@ -27,4 +27,11 @@
 	public static final String WEBEDITOR_SERVLET_PAGE_ADD_SERVLET_WIZARD_2 = PLUGIN_SERVLET_UI + "srvw1100"; //$NON-NLS-1$
 	public static final String WEBEDITOR_SERVLET_PAGE_ADD_SERVLET_WIZARD_3 = PLUGIN_SERVLET_UI + "srvw1200"; //$NON-NLS-1$
 	
+	public static final String WEBEDITOR_LISTENER_PAGE_ADD_LISTENER_WIZARD_1 = PLUGIN_SERVLET_UI + "lstw1050";
+	public static final String WEBEDITOR_LISTENER_PAGE_ADD_LISTENER_WIZARD_2 = PLUGIN_SERVLET_UI + "lstw1100";
+	public static final String WEBEDITOR_LISTENER_PAGE_ADD_LISTENER_WIZARD_3 = PLUGIN_SERVLET_UI + "lstw1200";
+
+    public static final String WEBEDITOR_FILTER_PAGE_ADD_FILTER_WIZARD_1 = PLUGIN_SERVLET_UI + "fltw1050";
+    public static final String WEBEDITOR_FILTER_PAGE_ADD_FILTER_WIZARD_2 = PLUGIN_SERVLET_UI + "fltw1100";
+    public static final String WEBEDITOR_FILTER_PAGE_ADD_FILTER_WIZARD_3 = PLUGIN_SERVLET_UI + "fltw1200";
 }
diff --git a/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/AddFilterWizard.java b/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/AddFilterWizard.java
index 67d6e43..ad4dd73 100644
--- a/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/AddFilterWizard.java
+++ b/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/AddFilterWizard.java
@@ -15,6 +15,7 @@
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
 import org.eclipse.jst.j2ee.internal.web.operations.NewFilterClassDataModelProvider;
+import org.eclipse.jst.servlet.ui.IWebUIContextIds;
 import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
 import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
 
@@ -49,11 +50,11 @@
 		        IWebWizardConstants.NEW_JAVA_CLASS_DESTINATION_WIZARD_PAGE_DESC,
 				IWebWizardConstants.ADD_FILTER_WIZARD_PAGE_TITLE, 
 				J2EEProjectUtilities.DYNAMIC_WEB);
-//		page1.setInfopopID(IWebUIContextIds.WEBEDITOR_FILTER_PAGE_ADD_FILTER_WIZARD_1);
+		page1.setInfopopID(IWebUIContextIds.WEBEDITOR_FILTER_PAGE_ADD_FILTER_WIZARD_1);
 		addPage(page1);
 
 		AddFilterWizardPage page2 = new AddFilterWizardPage(getDataModel(), PAGE_TWO);
-//		page2.setInfopopID(IWebUIContextIds.WEBEDITOR_FILTER_PAGE_ADD_FILTER_WIZARD_2);
+		page2.setInfopopID(IWebUIContextIds.WEBEDITOR_FILTER_PAGE_ADD_FILTER_WIZARD_2);
 		addPage(page2);
         
         NewFilterClassOptionsWizardPage page3 = new NewFilterClassOptionsWizardPage(
@@ -61,7 +62,7 @@
                 PAGE_THREE,
                 IWebWizardConstants.NEW_JAVA_CLASS_OPTIONS_WIZARD_PAGE_DESC,
                 IWebWizardConstants.ADD_FILTER_WIZARD_PAGE_TITLE);
-//        page3.setInfopopID(IWebUIContextIds.WEBEDITOR_FILTER_PAGE_ADD_SERVLET_WIZARD_3);
+        page3.setInfopopID(IWebUIContextIds.WEBEDITOR_FILTER_PAGE_ADD_FILTER_WIZARD_3);
         addPage(page3);
 	}
     
diff --git a/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/AddListenerWizard.java b/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/AddListenerWizard.java
index 2c7e9a4..6d0df70 100644
--- a/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/AddListenerWizard.java
+++ b/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/AddListenerWizard.java
@@ -15,6 +15,7 @@
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
 import org.eclipse.jst.j2ee.internal.web.operations.NewListenerClassDataModelProvider;
+import org.eclipse.jst.servlet.ui.IWebUIContextIds;
 import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
 import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
 
@@ -48,17 +49,17 @@
 				PAGE_ONE,
 				IWebWizardConstants.NEW_JAVA_CLASS_DESTINATION_WIZARD_PAGE_DESC,
 				IWebWizardConstants.ADD_LISTENER_WIZARD_PAGE_TITLE, J2EEProjectUtilities.DYNAMIC_WEB);
-//		page1.setInfopopID(IWebUIContextIds.WEBEDITOR_SERVLET_PAGE_ADD_SERVLET_WIZARD_1);
+		page1.setInfopopID(IWebUIContextIds.WEBEDITOR_LISTENER_PAGE_ADD_LISTENER_WIZARD_1);
 		addPage(page1);
 		AddListenerWizardPage page2 = new AddListenerWizardPage(getDataModel(), PAGE_TWO);
-//		page2.setInfopopID(IWebUIContextIds.WEBEDITOR_SERVLET_PAGE_ADD_SERVLET_WIZARD_2);
+		page2.setInfopopID(IWebUIContextIds.WEBEDITOR_LISTENER_PAGE_ADD_LISTENER_WIZARD_2);
 		addPage(page2);
 		NewListenerClassOptionsWizardPage page3 = new NewListenerClassOptionsWizardPage(
 				getDataModel(), 
 				PAGE_THREE,
 				IWebWizardConstants.NEW_JAVA_CLASS_OPTIONS_WIZARD_PAGE_DESC,
 				IWebWizardConstants.ADD_LISTENER_WIZARD_PAGE_TITLE);
-//		page3.setInfopopID(IWebUIContextIds.WEBEDITOR_SERVLET_PAGE_ADD_SERVLET_WIZARD_3);
+		page3.setInfopopID(IWebUIContextIds.WEBEDITOR_LISTENER_PAGE_ADD_LISTENER_WIZARD_3);
 		addPage(page3);
 	}