0

I have the following Head section on JSP file,

<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>DDF Generator</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">

        <!-- JQuery -->

        <spring:url value="/RESOURCES/JQuery/jquery-1.11.3.min.js"
var="jqueryJs" />
        <script src="${jqueryJs}"/>

        <!-- Bootstrap files -->
        <spring:url
value="/RESOURCES/Bootstrap/bootstrap-3.3.6-dist/js/bootstrap.js"
var="bootstrapJs" />
        <spring:url
value="/RESOURCES/Bootstrap/bootstrap-3.3.6-dist/js/bootstrap.min.js"
var="bootstrapMinJs" />
        <spring:url value="/RESOURCES/Bootstrap/bootstrap-3.3.6-dist/js/npm.js"
var="npmJs" />
        <script src="${bootstrapJs}"/>
        <script src="${bootstrapMinJs}"/>
        <script src="${npmJs}"/>

        <spring:url
value="/RESOURCES/Bootstrap/bootstrap-3.3.6-dist/css/bootstrap-theme.css"
var="bootstrapTheme" />
        <spring:url
value="/RESOURCES/Bootstrap/bootstrap-3.3.6-dist/css/bootstrap-theme.min.css"
var="bootstrapThemeMin" />
        <spring:url
value="/RESOURCES/Bootstrap/bootstrap-3.3.6-dist/css/bootstrap.css"
var="bootstrap" />
        <spring:url
value="/RESOURCES/Bootstrap/bootstrap-3.3.6-dist/css/bootstrap.min.css"
var="bootstrapMin" />
        <link href="${bootstrapMin}" rel="stylesheet" />

        <!-- Including LOGO Image -->
        <spring:url value="/RESOURCES/IMAGESOURCES/schneider.png" var="logo" />

        <!-- Common CSS file for this project -->
        <spring:url value="/RESOURCES/CSS/common.css" var="common" />
        <link href="${common}" rel="stylesheet" />

        <!-- Page specific javascript -->
        <spring:url value="/RESOURCES/JavaScripts/deviceLevelData.js"
var="thisPageJs" />
        <script src="${thisPageJs}"/>

    </head>

I have loaded page specific JS after loading Jquery JS, But still the code in external js is not working. The same code works when it is written inside the "body" section. Any Ideas ?

1
  • All the JS files are shown including the page specific JS @Jai Commented Jan 8, 2016 at 8:33

1 Answer 1

1

Try this

<script src="url"></script>

instead of this

<script src="url"/>

Also add this to your xml configuration :

<mvc:resources location="/resources/" mapping="/resources/**" />
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.