Hi All,
I am new to jsp. I need to know how to execute certain code on a button click(submit).
my form has a text box and a submit button. Onclicking it, it has to execute a SQL query and then forward the control to another jsp page.
Where to write the query??

Please help!!
Thanks in advance.

the easiest solution is to just use scriptlets on the page the form is forwarded to. If you want to use jsp correctly, you should not use scriptlets but instead move this code to java classes.

Thanks sillyboy !!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.