• Post Reply Bookmark Topic Watch Topic
  • New Topic

Calling java method defined in jsp  RSS feed

 
Nidheesh Krishna
Ranch Hand
Posts: 62
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to call a java method defined in jsp inside a javascript method defined in same jsp page?
 
Tim Moores
Saloon Keeper
Posts: 3957
94
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all, you should not define methods in JSPs - they are meant as a view template, not for any kind of serious processing. If you need some custom processing, use a tag file.

Secondly, JavaScript and JSP are entirely separate: the former is executed on the client, while the latter is executed on the server - and never the twain shall meet :-)
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66260
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please read this article to understand how JSP operates and why what you are asking makes little sense.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!