zoukankan      html  css  js  c++  java
  • 使用<jsp:forward>完成跳转

    forward.jsp

    <%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Insert title here</title>
    </head>
    <body>
    <jsp:forward page="target.jsp">
    <jsp:param value="1234" name="userName"/>
    <jsp:param value="123456" name="password"/>
    </jsp:forward>
    </body>
    </html>

    target.jsp

    <%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Insert title here</title>
    </head>
    <body>
    服务器内部跳转后的页面<br/>
    userName:<%=request.getParameter("userName") %><br/>
    password:<%=request.getParameter("password") %><br/>
    </body>
    </html>

  • 相关阅读:
    terminal
    变量提升、函数提升
    ssh传输文件
    mocha测试框架
    npm-run 自动化
    webpack
    浅析babel
    构建工具gulp
    C++中TRACE宏及assert()函数的使用
    memcpy函数-C语言
  • 原文地址:https://www.cnblogs.com/lkwkk/p/14215059.html
Copyright © 2011-2022 走看看