User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 402,711 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,396 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 1401 | Replies: 4
Reply
Join Date: Feb 2007
Posts: 14
Reputation: Thendral is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
Thendral Thendral is offline Offline
Newbie Poster

JSP along database

  #1  
Feb 27th, 2007
Hai..

I need to connect a database called "Postgresql" with a jsp code.
how it can be done?
I need the connection procedure for that.
plz reply me..
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2006
Posts: 1,378
Reputation: masijade is a jewel in the rough masijade is a jewel in the rough masijade is a jewel in the rough masijade is a jewel in the rough 
Rep Power: 8
Solved Threads: 120
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Virtuoso

Re: JSP along database

  #2  
Feb 27th, 2007
Read the JDBC tutorials at Sun, the JDBC documentation for the PostGreSQL Driver (once you download it), and the J2EE tutorial at Sun.
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote  
Join Date: Feb 2007
Posts: 14
Reputation: Thendral is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
Thendral Thendral is offline Offline
Newbie Poster

Re: JSP along database

  #3  
Feb 27th, 2007
I have postgresql in my system.also i created schema and table there. i need the coding for connecting that database and my JSP program.
Reply With Quote  
Join Date: Feb 2006
Posts: 1,378
Reputation: masijade is a jewel in the rough masijade is a jewel in the rough masijade is a jewel in the rough masijade is a jewel in the rough 
Rep Power: 8
Solved Threads: 120
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Virtuoso

Re: JSP along database

  #4  
Feb 27th, 2007
And I pointed you to resources that will enable you to do that. The first one will teach you how to use JDBC. The second one will provide you the specifics (read Connection URL) for PostGreSQL, the third one will help you integrate that information into JSP (and hopefully you will do it in the proper manner and use a bean or JSTL tag for accessing the DB rather than a scriptlet).

Here are the three resources as links:

http://java.sun.com/docs/books/tutorial/jdbc/index.html
http://jdbc.postgresql.org/doc.html
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/

I am not going to simply give you ready made code. Try it yourself, and if you have problems post your code here and we will help to correct it.
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote  
Join Date: Nov 2004
Location: Netherlands
Posts: 5,700
Reputation: jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough 
Rep Power: 18
Solved Threads: 195
Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: JSP along database

  #5  
Feb 27th, 2007
and learn proper separation of control. JSP are not meant for that.
42 Private messages asking for help will be ignored
In the frozen land of Nador they were forced to eat Steve's iMinstrels, and there was much rejoicing.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JSP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JSP Forum

All times are GMT -4. The time now is 6:31 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC