beginJsp2.0外文书籍源代码
源代码在线查看: include.java
package com.wrox.servlets;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class Include extends HttpServlet
{
String forwardingAddress = "Goto";
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
{
req.setAttribute("option", "include");
RequestDispatcher dispatcher = req.getRequestDispatcher(
forwardingAddress);
dispatcher.include(req, res);
PrintWriter out = res.getWriter();
out.println("Response included successfully");
}
}