This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan 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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Execute a Javascript in JSP on server" Watch "Execute a Javascript in JSP on server" New topic
Author

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
Rancher

Joined: Mar 22, 2000
Posts: 12671
    
    5
JavaScript can be executed on the server side using BSF - the Bean Scripting Framework. If that is really what you intend.
Bill


Java Resources at www.wbrogden.com
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Execute a Javascript in JSP on server
 
Similar Threads
how to call a jsp function from java script
How to call Javascript function from managed bean
Interesting!!!!!!!!!!!!!!!!!!!!!!
Doubt in JSP Code
Process Custom tag based on the given input from html (same page)