An included servlet package com.ack.web.servlet; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class AnIncludedServlet extends HttpServlet { public void doGet( HttpServletRequest req, HttpServletResponse res ) throws ServletException, IOException { PrintWriter pw = res.getWriter(); /** * note that a servlet that has been included within another * servlet has access to both the original request uri, servlet * path, path info, context path and query string through the * HttpServletRequest object. * * However it also has access to these values that can be different * depending on how the servlet include was dispatched. The servlet * engine gives you access to these though request attributes as * demonstrated before. */ pw.println( "