Skip to content Skip to sidebar Skip to footer

Include External Java Script File In Jsp Page

I have an external JavaScript file named paging.js. Following are the contents of the file: function Pager(tableName,itemPerPage){ this.tableName = tableName; this.itemPerP

Solution 1:

This line of code is the problem:

this.init()= function(){

Change it to:

this.init=function() {

Solution 2:

Try

<script type="text/javascript" 
                  src="js/paging.js"></script>

Solution 3:

With .jsp 2.+ technology, I place all my links and scripts in a separate file that I reference using the <jsp:include> directive:

<jsp:include page="//path to your links_and_scripts page">

My links_and_scripts page has this meta and the path to my script:

<meta http-equiv="Content-Script-Type" content="application/javascript; charset=utf-8" />
<script src="// path to your scripts js"></script>
//...your other scripts and links here

Post a Comment for "Include External Java Script File In Jsp Page"