aspose file tools*
The moose likes JSP and the fly likes how to grab data from a database and display it in a form 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 "how to grab data from a database and display it in a form" Watch "how to grab data from a database and display it in a form" New topic
Author

how to grab data from a database and display it in a form

kamilla miesak
Ranch Hand

Joined: Mar 06, 2001
Posts: 30
Hello,
I'm new to JSP and I'm trying to figure out how do I extract data from a table and display it in a form, so for example it can be edited by a user and then resubmitted with changes.
Any help will be appreciated.
Thanks
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

'kamilla'
Your name no longer complies with the JavaRanch naming policy.
Please change back to your original (valid) name or you risk having your account locked
Thanks,
Dave
kamilla miesak
Ranch Hand

Joined: Mar 06, 2001
Posts: 30
and I was hopeful that I got a reply to my question so quickly
no problem, I've changed it already
thanks
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Thanks for being so prompt.
Can we get some info on the application server and database you intend to use?
Have you set things up already?
Do you have sample JSPs running yet?
Also, do you have any stand-alone JDBC apps running yet?
It's easier to so some JDBC stuff and some JSP stuff separately then merge the two rather than learn them both at once.
Dave.
kamilla miesak
Ranch Hand

Joined: Mar 06, 2001
Posts: 30
I'm using Tomcat and for now I have a Microsoft Access file with an employee table that I'm using. I know how to run stand-alone JSPs, know already about how to set up a connection, and etc. I know how to get data from a database and display it in a table (I've tried it and it works), but I don't know how to put it in a form, so it can be edited further and updated.
thanks
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1506
Since you already know how to put it in a table, you just have to do something similar for a form. Just create your textboxes and other form elements dynamically (depending on the data)i.e if you have a yes/no DB field you will create a checkbox, and you will create textboxes for textfields, etc. As usual, you will have beginning and ending form tags.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to grab data from a database and display it in a form
 
Similar Threads
How to display PDF data type with XSLT ?
Struts Problem
Struts Problem
Struts Problem
How to bind data to a Spring form input tag