aspose file tools*
The moose likes JDBC and the fly likes servlet and database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "servlet and database " Watch "servlet and database " New topic
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: 514
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: 61424
    
  67

Moved to the JDBC forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by 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...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: servlet and database