Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Moving javascript with scriptlets to a separate file

 
Lavanya Mothilal
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I am trying to move a javascript present inside a JSP to a separate file. But the javascript doesnt work after moving because it contains some scriptlets . Is there a way which makes the javascript to work ?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65111
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Scriptlets will, of course, only be processed if they are in a JSP. Moving the JavaScript template text containing scriptlets to a .js file prevents the scriptlets from ever being processed.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic