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 Execute a Javascript in JSP on server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » JSP
Bookmark "Execute a Javascript in JSP on server" Watch "Execute a Javascript in JSP on server" New topic

Execute a Javascript in JSP on server

John King
Ranch Hand

Joined: Aug 27, 2002
Posts: 165
My JSP contains a Javascript that is executed
with onClick function. When user clicks, this
script is executed on client side. Is there a way
I can execute this script on the web server side
before it is sent to client? Thanks.
Varun Khanna
Ranch Hand

Joined: May 30, 2002
Posts: 1400
Can you post your code as that will help in knowing what you want to achieve !!!

- Varun
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12998
JavaScript can be executed on the server side using BSF - the Bean Scripting Framework. If that is really what you intend.
I agree. Here's the link:
subject: Execute a Javascript in JSP on server
It's not a secret anymore!