| Author |
servlet and database
|
Rahul Sudip Bose
Ranch Hand
Joined: Jan 21, 2011
Posts: 637
|
|
how can i make my servlet access a database and print/store a table from it. Can you suggest any websites/books with a simple example that does this and nothing else ?
|
SCJP 6. Learning more now.
|
 |
amit punekar
Ranch Hand
Joined: May 14, 2004
Posts: 490
|
|
Hi,
You need to learn JDBC and establish a JDBC connection from a servlet(in its simplest form or else use separate Data Access layer to do this).
Using this java.sql.Connection, you can interact with Database from DDL and DML queries.
Another option is to use some framework like iBatis to access the Database. That might be the next step once you are done working with plain JDBC Connection.
Regds,
amit
|
 |
Rahul Sudip Bose
Ranch Hand
Joined: Jan 21, 2011
Posts: 637
|
|
amit punekar wrote:Hi,
You need to learn JDBC and establish a JDBC connection from a servlet(in its simplest form or else use separate Data Access layer to do this).
Using this java.sql.Connection, you can interact with Database from DDL and DML queries.
Any website/book where i can get some simple examples for that ?
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56528
|
|
|
Moved to the JDBC forum.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
Have a look at our FAQs, there are a bunch of resources in there. You should also have a look at the JDBC tutorial.
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
Rahul Sudip Bose
Ranch Hand
Joined: Jan 21, 2011
Posts: 637
|
|
Paul Sturrock wrote:Have a look at our FAQs, there are a bunch of resources in there. You should also have a look at the JDBC tutorial.
ok, reading...will get back here later...
|
 |
 |
|
|
subject: servlet and database
|
|
|