This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to write a JSP code in javascript?  RSS feed

 
Sasikumar Senthilnathan
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my JSP file I need to rewrite the content of a <div> using Java script. <div> contains the JSP scriptlet tag.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66188
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With the usual caveat about scriptlets being technology that is over 12 years out-of-date (12 years!) and should not be used, you can make an Ajax request to the server and load the result into the DOM.

The jQuery .load() method is one of the easiest ways to do this.
 
Sasikumar Senthilnathan
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks!!!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!