jsp/servlet第三章第五节jsp跳转指令
来源:互联网 发布:天天直播网络东方卫视 编辑:程序博客网 时间:2024/05/29 17:55
< jsp:forward page=” 要跳转的页面”>
< jsp:param value=”” name=””>
< / 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>2</title></head><body><jsp:forward page="target.jsp"> <jsp:param value="world" name="Str" /> </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>2</title></head><body>服务器内部 跳转后的页面<br> hello:<%=request.getParameter("Str") %></body></html>
运行结果:
结论:
1.服务器内部跳转不会在地址栏显示跳转过程
2.服务器跳转可以带参跳转
阅读全文
0 0
- jsp/servlet第三章第五节jsp跳转指令
- jsp/servlet第四章第五节application范围实例
- jsp/servlet第五章第五节pagecontext对象
- jsp/servlet第三章第四节jsp包含指令
- jsp/servlet第三章第二节Page指令
- 第三章 --- 第五节
- jsp/servlet第三章第三节scriptlet标签
- jsp,servlet页面跳转
- servlet跳转jsp页面
- servlet、jsp页面跳转
- jsp servlet跳转
- jsp,servlet页面跳转 .
- servlet跳转Jsp方法
- 简单jsp servlet 跳转
- servlet跳转到jsp
- jsp基础(三)跳转指令
- Servlet&JSP 第三章 请求与响应
- jsp/servlet 第一天
- 秒杀系统架构优化思路
- JavaScript的外部对象
- 1037. 在霍格沃茨找零钱(20)
- svn,文件重命名
- Spark源码之路(一):绝对靠谱,Windows下用IDEA搭建源码阅读环境
- jsp/servlet第三章第五节jsp跳转指令
- 区域点内个数
- Codeforces Round #380 (Div. 2, Rated, Based on Technocup 2017
- 软件工程(c编码实践篇) 学习总结
- Lifelong!
- 爬虫安装scrapy
- HDU 1863 畅通工程
- 软件工程(C编码实践篇)学习总结
- android 高德地图 驾车路线规划