How to use servlets and JSPs is explained in Chapter 19 Developing Web Components or Chapter 25 Defining the Ear Deployment Descriptor.