When you create a servlet using the File
New wizard and place it in a web module, the IDE handles certain tasks for you.
These tasks include automatically updating the web module's deployment descriptor
to include the servlet and setting certain properties for the servlet. This
practice is recommended for developing servlets in the IDE.
If you have an existing servlet class file that you want to add to a web module, a different procedure is required.
To add an existing servlet to a web module:
If you do not click Process All in the Confirm Changes dialog, you will have to register the new servlet in the destination web module's deployment descriptor by hand, using the following steps:
To register an added servlet in the web module's deployment descriptor:
![]() |
Note that this feature might not be included in your version of the IDE.
If it is not available, you can edit the deployment descriptor (web.xml)
file using the editor of your choice.
|
![]() |
If you want to execute servlets that
are Java sources, you need to mark them as servlets using Tools ![]() |
See Also | |
---|---|
Editing Web Module Deployment
Properties Editing Servlet Properties |