首页 > Web开发 > 详细

jsp应用

时间:2015-04-28 17:35:13      阅读:206      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!