jsp多页面使用同一段html jsp代码方法 多页面包含同一段html代码
来源:互联网 发布:淘宝长尾词 编辑:程序博客网 时间:2024/05/16 14:08
jsp页面包含html代码
jsp页面(t2.jsp):
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%><%String path = request.getContextPath();String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <head> <base href="<%=basePath%>"> <title>My JSP 't2.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache"><meta http-equiv="cache-control" content="no-cache"><meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"><meta http-equiv="description" content="This is my page"><!--<link rel="stylesheet" type="text/css" href="styles.css">--> </head> <body> <%@include file="t1.html" %> This is my JSP page. <br> </body></html>
被包含的html页面;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <head> <title>t1.html</title> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="this is my page"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <!--<link rel="stylesheet" type="text/css" href="./styles.css">--> </head> <body> This is my HTML page. <br> <div style="height: 100px;border-bottom-style: dotted;border-bottom-color: red;"></div> </body></html>
含有共同页面的jsp页面(t2.jsp);
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%><%String path = request.getContextPath();String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <head> <base href="<%=basePath%>"> <title>My JSP 't2.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache"><meta http-equiv="cache-control" content="no-cache"><meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"><meta http-equiv="description" content="This is my page"><!--<link rel="stylesheet" type="text/css" href="styles.css">--> </head> <body> <%@include file="t1.jsp" %> This is my JSP page. <br> </body></html>
被包含的页面 (t1.jsp)
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%><%String path1 = request.getContextPath();String basePath2 = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path1+"/";%><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <head> <title>My JSP 't1.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache"><meta http-equiv="cache-control" content="no-cache"><meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"><meta http-equiv="description" content="This is my page"><!--<link rel="stylesheet" type="text/css" href="styles.css">--> </head> <body> This is my JSP page. <br> <c:out value="111111111111111"></c:out> <div style="height: 100px;border-bottom-style: dotted;border-bottom-color: red;"></div> </body></html>
- jsp多页面使用同一段html jsp代码方法 多页面包含同一段html代码
- 同一空间绑定多个域名而实现访问不同的页面代码,PHP,jsp和ASP代码
- jsp生成html静态页面代码
- JSP和HTML关闭页面的代码
- JSP页面显示图片,word,excel等代码段
- 同一页面js传值到html
- 在html页面中插入jsp代码实现页面导航
- jsp经典代码段
- js +html 同一页面,多个全选 /全不选
- html中不使用内置对象的方式实现多个页面用同一变量
- 过滤器中向所有JSP页面插入html代码
- MVC中提交包含HTML代码的页面处理方法
- 一次请求执行两次同一html页面
- jsp html 页面DOCTYPE
- web页面(html,jsp)
- jsp 页面转成 html 页面
- java 多线程同步--多个线程启动执行同一段代码
- php原子性操作测试,有效防止多进程对同一段代码的重复执行
- Proof of concept (POC) 即 概念原型
- 大数据案例分析:电信业Hadoop应用分析 原文出自【比特网】,转载请保留原文链接:http://do.chinabyte.com/228/12410228.shtml
- Linux内核基础-container_of
- ubuntu 下设置双网卡 实现内外网访问
- Android -- Bundle对象的使用
- jsp多页面使用同一段html jsp代码方法 多页面包含同一段html代码
- 云标签,关键字图排版 html5 canvas版
- 基于x210v3/s5pv210开发板的裸机教程发布,含26个精美实例
- Action和Func
- *为什么电脑会死机定格的问题大全*【免费xp系统下载】
- Java RMI技术
- Cocos2d-x android项目移植——各类bug及常见问题解决方案全集
- android应用开发错误:Your project contains error(s),please fix them before running your
- 查询分析器比.net程序执行快需要修正的几点参考