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

JSTL标签中import,redirect标签的使用

2016-11-13 14:29 357 查看
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<%

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 'jstl1.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">

  </head>

  

  <body>

 <%--  <h4>import标签的使用(导入指定页面)</h4>

  <c:import url="http://www.baidu.com" charEncoding="UTF-8"/><br/> --%>

   <h4>redirect标签的使用(导入到指定页面)</h4>

  <c:import url="jstl1.jsp" charEncoding="UTF-8"/><br/>

  </body>

</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: