First of all, the servlet code must be packaged into a form that suits the application server. This example will create a web module for use with WAS 4.0.
From the WebSphere® Administrative Console, choose the menu item Application Assembly tool from the Tools menu. The Application assembly tool should appear.
Select "Create Web Module Wizard", and click OK. In specifying the properties, enter the file name, and more information, if you wish.