forward.java
来自「Begining JSP Web Development外文书籍源代码」· Java 代码 · 共 24 行
JAVA
24 行
package com.wrox.servlets;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class Forward extends HttpServlet {
String forwardingAddress = "Goto";
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
req.setAttribute("option", "forward");
RequestDispatcher dispatcher =
req.getRequestDispatcher(forwardingAddress);
dispatcher.forward(req, res);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?