jsp web application development

C

claydn

Hi,

I originally submitted this to another group but think this one is more
appropriate so was wondering if anyone could help.

Thanks
Nick
---------------
I am new to JSP development and I need to create a web application with a
database back end (MS Access for test purposes). I have found some code
which connects to the database, and displays the records but all the code is
done on one jsp page.

I would like to take it a bit further and remove this from the jsp page. So
I have a Connect function, a Disconnect function and a RunQuery function,
which I can call from the jsp page.

But what is the best way to do this? Would it be in a Bean ? Does anyone
have an sample code I could look at which shows simply how to connect to the
database this way and run a query against it ?

Thanks
Nick
 
S

Sudsy

claydn wrote:
I would like to take it a bit further and remove this from the jsp page. So
I have a Connect function, a Disconnect function and a RunQuery function,
which I can call from the jsp page.

But what is the best way to do this? Would it be in a Bean ? Does anyone
have an sample code I could look at which shows simply how to connect to the
database this way and run a query against it ?

You use tags. Fortunately, a lot of the work has already been done. Take a
look at the sql tags, part of Sun's JSTL package:
<http://java.sun.com/products/jsp/jstl/1.1/docs/tlddocs/index.html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,533
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top