您的位置:首页 > Web前端 > JavaScript

JSP页面参数详解

2009-12-11 16:57 239 查看
<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<%
// 输出相对工程目录:/myBlog
String path = request.getContextPath();
// 输出绝对工程目录:http://localhost:8080/myBlog/
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>主页</title>
<!-- 禁止浏览器从本地机的缓存中调阅页面内容 -->
<meta http-equiv="pragma" content="no-cache">
<!-- 指示请求或响应消息不能缓存 -->
<meta http-equiv="cache-control" content="no-cache">
<!-- 指定网页在缓存中的过期时间,一旦网页过期,必须到服务器上重新调阅 -->
<meta http-equiv="expires" content="0">
<!-- 本网页的关键信息,为搜索引擎提供关键字("Keywords") -->
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<!-- 网页描述 -->
<meta http-equiv="description" content="This is heyuanbo's page">
<!-- 本网页的作者 -->
<meta name="author" content="贺圆波">
<!-- 每3秒钟刷新一次页面 -->
<!-- <Meta http-equiv="refresh" content="3"> -->
<!-- 3秒钟后跳转到指定页面 -->
<!-- <Meta http-equiv="refresh" content="3; url=http://www.baidu.com/">-->
<!--
<link rel="stylesheet" type="text/css" href="styles.css" mce_href="styles.css">s
-->
<script type="text/javascript" src="common.js" mce_src="common.js" />
</head>
<body>
This is heyuanbo's page
</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: