Search code examples
javascripthttp-headersspring-roojspx

JSPX - How to add javascript in jspx


In my web application I am using JSPX (Spring ROO). I need to add javascript in JSPX. can anyone share any useful link to guide me in adding it.

Actually the problem is to close the session when the user closes the browser.

I tried to add the following code in my JSPX file to clear the cache. But I dont know how to add it.

<head>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="-1">
</head>

Can any one please help me in adding the above code or adding javascript in my JSPX file?


Solution

  • If you have used web mvc scaffolding, you can take a look at \src\main\webapp\WEB-INF\tags\util\load-scripts.tagx to see how spring loads the dojo javascript framework.

    However, you probably want to read this link before going any further.