This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JSP and the fly likes Can I use JavaScript inside a JSP page? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "Can I use JavaScript inside a JSP page?" Watch "Can I use JavaScript inside a JSP page?" New topic
Author

Can I use JavaScript inside a JSP page?

nan sh
Ranch Hand

Joined: Jan 05, 2001
Posts: 167
I couldn't find any official documentation to say I can do that.
nan sh
Ranch Hand

Joined: Jan 05, 2001
Posts: 167
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

Joined: Mar 22, 2000
Posts: 13001
    
    5
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

Joined: Jan 05, 2001
Posts: 167
Thanks Bill and your books.
 
Have you checked out Aspose?
 
subject: Can I use JavaScript inside a JSP page?
 
It's not a secret anymore!