Using the Deployment Descriptor to map URLs to servlets

When you deploy your servlet into your web Container, you’ll create a fairly simple XML document called the Deployment Descriptor (DD) to tell the Container how to run your servlets and JSPs. Although you’ll use the DD for more than just mapping names, you’ll use two XML elements to map URLs to servlets—one to map the client-known public URL name to your own internal name, and the other to map your own internal name to a fully-qualified class name.

The two DD elements for URL mapping:

  1. <servlet>
       maps internal name to fully-qualified class name
  2. <servlet-mapping>
       maps internal name to public URL name
    image with no caption
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset