DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2005

    how to access database data using servlets


    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.


  2. #2
    Join Date
    Oct 2005
    New Jersey
    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, 03:28 PM
  2. Replies: 2
    Last Post: 02-09-2001, 08:24 PM
  3. Data Access Pages to Emulate Website on CD
    By John Simmons in forum Enterprise
    Replies: 0
    Last Post: 02-09-2001, 12:42 PM
  4. Replies: 0
    Last Post: 01-17-2001, 10:38 PM
  5. Replies: 6
    Last Post: 08-21-2000, 07: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
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

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

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.