• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
'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
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 1514
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
reply
    Bookmark Topic Watch Topic
  • New Topic