Announcement Announcement Module
Collapse
No announcement yet.
include js file in page Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • include js file in page

    hello,

    I am very new to use spring fraame work, i don't understand how to include our js file in our jsp page in spring,

    <script src="PagingLogic1.js" type="javascript"></script>

    PagingLogic1.js is my file which is in same directory where my jsp page is stored, but it is not called.. so tell me how to do this..

    Thanks.
    bye.

  • #2
    Where is this js file relative to the classpath of your war?

    For example if this file was under WEB-INF/jsp then you can link to it as follows
    <script src="<c:url value='/jsp/PagingLogic1.js'/>" type="javascript"></script> where ofcourse the c tag refers to the core jstl tags.

    Comment


    • #3
      HTML Code:
      <script language="JavaScript1.2" src="/yourprojectRoot/javascript/myscript.js" type="text/javascript"></script>
      This also should work

      Comment

      Working...
      X