• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to include javascript in jsp

 
Aashish k Dalmia
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64173
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You won't. Tomcat runs on the server, JavaScript runs on the client.

How are you creating "output" in JavaScript?
 
Aashish k Dalmia
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5575
Eclipse IDE Java Windows XP
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64173
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic