Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Moving javascript with scriptlets to a separate file  RSS feed

 
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
Posts: 65826
134
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!