A Web project exists. See Creating Web Projects.
1. Choose File → New → Other.
2. On the left pane of the first wizard page, choose J2EE → Web, and on the right pane, select Listener.
3. Choose Next.
4. In the Web Project field, select the Web project that will contain the listener.
5. In the Listener Name field, enter a name for the listener class.
6. In the Listener Type field, select the type.
7. In the Listener Package field, enter a package for the listener.
If the package does not exist, you can create it now.
8. If required, specify the superclass in the Superclass field.
9. Choose Finish.
The Java editor opens with the generated source code.
You can see the listener in the source node of the relevant Web project in the J2EE Explorer (for ordinary projects) or J2EE DC Explorer (for DC projects).
You can now edit the source file in the Java editor. See Developing Event Listeners.