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>

<html lang="en">

<head>

    <!--IE=edge告诉IE使用最新的引擎渲染页面-->

    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <!-- 设置网页全屏幕大小为设备的大小-->

    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>登陆</title>

    <meta name="description" content="登陆" />

    <meta name="keywords" content="168,商城" />

    <link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">

    <link rel="stylesheet" type="text/css" href="<%=basePath%>resource/css/bootstrap.css">

    <link rel="stylesheet" type="text/css" href="<%=basePath%>resource/css/common.css">

    <style type="text/css">

body {

    background: #F7F7F6 url(<%=basePath%>resource/image/body-bg.jpg)

        repeat-y fixed 0 0;

}

</style>

</head>

<body>

    <script src="<%=basePath%>resource/js/jquery-2.1.1.js"></script>

    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>

    <script src="<%=basePath%>resource/js/bootstrap.js"></script>

    <script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>

    <jsp:forward page="WEB-INF/page/register.jsp"></jsp:forward>

</body>

</html>

资源文件是放在webroot下的resource文件下

你可能感兴趣的:(jsp)