aspose file tools*
The moose likes JSP and the fly likes How to include javascript in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "How to include javascript in jsp" Watch "How to include javascript in jsp" New topic
Author

How to include javascript in jsp

Aashish k Dalmia
Greenhorn

Joined: Jul 03, 2012
Posts: 2
How to include javascript in jsp.
I tried many ways to include javascript in jsp but I am not seeing output of javascript in tomcat log files
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61010
    
  65

You won't. Tomcat runs on the server, JavaScript runs on the client.

How are you creating "output" in JavaScript?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Aashish k Dalmia
Greenhorn

Joined: Jul 03, 2012
Posts: 2
In javascript I tried log, alert etc.
But I still don't see the message in tomcat log file.
Aashish Dalmia
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Aashish DalmiaDenver wrote:In javascript I tried log, alert etc.
But I still don't see the message in tomcat log file.

As Bear said, you can't see alert message in tomcat log. you should read about firebug(in case you use Firefox browser) . if you try to see a scope variable's value, log/print on action or servlet classes.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61010
    
  65

Aashish DalmiaDenver wrote:But I still don't see the message in tomcat log file.

Read my reply again!

You obviously don't understand what JSP is and how it operates. I'd recommend reading this article.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to include javascript in jsp