Hi Santosh,
I suppose you are meaning, using javascript server side (jsp-java servlet) , when you say "use javascript in Tomcat". If so, javascript is client side language and run in client (browser). Java (jsp, java servlet ) run on server side, so they can't do that. The only thing you can do is to call servlet or jsp from javascript using html from.
Thst's all I know about that.
Matteo