Win a copy of Kubernetes in Action this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

servlet and database  RSS feed

 
Ranch Hand
Posts: 637
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?

 
Ranch Hand
Posts: 544
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 637
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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 ?
 
Author and ninkuma
Marshal
Posts: 66352
155
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the JDBC forum.
 
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look at our FAQs, there are a bunch of resources in there. you should also have a look at the JDBC tutorial.
 
Rahul Sudip Bose
Ranch Hand
Posts: 637
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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...
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!