码迷,mamicode.com
首页 > Web开发 > 详细

jsp应用

时间:2015-04-28 17:37:23      阅读:138      评论:0      收藏:0      [点我收藏+]

标签:

 

<%@ page language="java" contentType="text/html; charset=UTF-8"
    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" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">  基链接标记,网页中的所有相对路径在链接时将在前面基链接指向的地址
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">  
    <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">
<title>Insert title here</title>
<link href="css/main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery-1.7.2.js"></script>

 

PS:清除浏览器中的缓存,它和其它几句合起来用,就可以使你再次进入曾经访问过的页面时,ie浏览器必须从服务端下载最新的内容,达到刷新的效果。

<body style="text-align: center;">
  <%@include file="../helper/head1.jsp"%>  引用其他jsp文件
  <% UserInfo user=(UserInfo)session.getAttribute("user"); 
  %>

 

jsp应用

标签:

原文地址:http://www.cnblogs.com/heyesp/p/4463286.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!