How to use servlets and JSPs is explained in Chapter 16 Developing Web Components or Chapter 22 Defining the EAR Deployment Descriptor.