943,962 Members | Top Members by Rank

Ad:
  • JSP Discussion Thread
  • Unsolved
  • Views: 4522
  • JSP RSS
Jul 9th, 2005
0

How do I access a PostgreSQL DB?

Expand Post »
I just got a JSP hosting account and I'm wondering how I can connect to the PostgreSQL DB and execute queries. According to the host's FAQ, the database URL is:
jdbc:postgresql://localhost/username,username,password
.
Similar Threads
Reputation Points: 17
Solved Threads: 5
Posting Whiz in Training
mmiikkee12 is offline Offline
274 posts
since Oct 2004
Jul 10th, 2005
0

Re: How do I access a PostgreSQL DB?

You don't access databases through JSP. JSP comes paired up with servlets written in Java. The servlets (and underlying classes) does all the heavy work, while the JSPs just view the results.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
keibi is offline Offline
9 posts
since Jun 2005
Jul 10th, 2005
0

Re: How do I access a PostgreSQL DB?

You can't just do it with
JSP Syntax (Toggle Plain Text)
  1. <%
  2. DB access code here
  3. %>
?
Reputation Points: 17
Solved Threads: 5
Posting Whiz in Training
mmiikkee12 is offline Offline
274 posts
since Oct 2004
Jul 10th, 2005
0

Re: How do I access a PostgreSQL DB?

No idea, I never tried. I manage my database connections with Hibernate (persistence framework), and put only view code in the jsp's.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
keibi is offline Offline
9 posts
since Jun 2005
Jul 16th, 2005
0

Re: How do I access a PostgreSQL DB?

Anyway, what's the Java code for accessing the DB?
Reputation Points: 17
Solved Threads: 5
Posting Whiz in Training
mmiikkee12 is offline Offline
274 posts
since Oct 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JSP Forum Timeline: Hide/display filed on a new row - not a trivial task
Next Thread in JSP Forum Timeline: Help:problem with getAttribute( )





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC