how to access database data using servlets


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: how to access database data using servlets

  1. #1
    Join Date
    Oct 2005
    Posts
    1

    how to access database data using servlets

    Hi

    recently i started developing J2ee applications using NetBeans. using Servlets if i am retriving data from database(mysql), i am not getting any data.
    can any one help how to use Netbeans to connect to databse using Servlets and to retrive data.

    Thanks.

  2. #2
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    255
    I would like to make one point that servlets are not intended to fetch data. Their only purpose is to provide for a controller block in the MVC architecture. Your classes for data access should take the responsibility of retreiving the data from the database. Your servlets should not have JDBC code mixed with them. It only makes the application difficult to debug.

    If you are having a specific problem with accessing database, posting a relevant snippet of your code alongwith an exception stack trace, if any, would be helpful. I'd rather refrain myself from guesswork.
    Happiness is good health and a bad memory.

Similar Threads

  1. VB6, Access database, Data encryption
    By Karen in forum VB Classic
    Replies: 6
    Last Post: 10-31-2002, 04:28 PM
  2. Replies: 2
    Last Post: 02-09-2001, 09:24 PM
  3. Data Access Pages to Emulate Website on CD
    By John Simmons in forum Enterprise
    Replies: 0
    Last Post: 02-09-2001, 01:42 PM
  4. Replies: 0
    Last Post: 01-17-2001, 11:38 PM
  5. Replies: 6
    Last Post: 08-21-2000, 08:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center