954,574 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

call java class on button click

Hi,
I'm new to JSP. I want a sample code to call a java class on button click in jsp.

ArunRaj.SRM
Newbie Poster
10 posts since Jul 2009
Reputation Points: 10
Solved Threads: 0
 

That you want in the way you want it cannot be done.
If you want to call a java method, after the page has rendered, by clicking a button you need to submit the form, to a servlet or jsp (preferably a servlet) and there you can call your java method. Then you must redirect to whatever page you want with the results.

Check the first Read Me post of the jsp forum about MVC:

"JSP database connectivity according to Model View Controller (MVC) Model 2"

javaAddict
Nearly a Senior Poster
Team Colleague
3,329 posts since Dec 2007
Reputation Points: 1,014
Solved Threads: 448
 

Thanks.

Issue solved now.

ArunRaj.SRM
Newbie Poster
10 posts since Jul 2009
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You