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

Can I use JavaScript inside a JSP page?  RSS feed

 
nan sh
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I couldn't find any official documentation to say I can do that.
 
nan sh
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry Mika, my question actually is that if a page is written by jsp( means page name has .jsp as suffix and gota JSP code inside), can I insert any JavaScript inside this page too?
As JSP don't support onMove() or more, so I have to use JavaScript. Am I allow to do that?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A JSP writes HTML output to a browser as a response to a request. Anything you can put in a static HTML page can be written by a JSP. You may have to be careful about escaping characters, etc. but it can be done.
I get the feeling that you are a little mixed up about where things happen - Javascript executes on the browser, JSP executes on the server.
Bill
 
nan sh
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bill and your books.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!