Postgres and Web access - Mailing list pgsql-novice

From Greg Thomas
Subject Postgres and Web access
Date
Msg-id 4084284F72C1D311898700A0C9D58323036A90@HOUSTON
Whole thread Raw
List pgsql-novice
OK.  I'm a bit overwhelmed over I think.

I'm going to start out by saying I dont know Linux very well at all.

Basicly, what I'd like to do is access the database from a web page.  The
person hosting the database right now doesn't give me the control I need to
manipulate that database, and takes a while to do that changes himself, so
I've decided to host it all myself.  (the database and web).

I got Redhat 7.0 installed the other day.  In the installation, it had the
options for postges, etc.  I selected all the options to get that installed.
I also installed apache web server.  At this point, I'm not absolutly
positive I have the JDBC stuff for postgres installed, even though I did
select the file in RH installation.   How can I test this?

This is where I'm a bit lost.   I got the postmaster running and can create,
modify, etc the database fine.  What do I need to do to connect the database
to the web server?  I didn't see much on apache in the documents for
PostreSQL, so if theres a better recomended web server, I'd be happy to use
that.  As I said, I'm just lost at this point.  The thing that'd probably
help me the most would be just a list and order of things to install from
scratch.  I kinda have an idea of what needs to be done, but no idea what
order to do it in, or what products to use.

(i.e.  1- Install Linux, 2- Install apache web server, etc...)

Thank you very much for your time and patients.

Here is a sample of the jsp code I'm using for page that works from the
original server (made everything generic to save space...) to maybe give you
a better idea.

<html>
<head>
<title>Test</title>
<%@ page import="java.util.*,java.sql.*" %>
</head>
<body>

<%
    Connection c =
DriverManager.getConnection("jdbc:postgresql://127.0.0.1/database_name","use
r","password");
    Statement s = c.createStatement();
    ResultSet resultset_name = s.executeQuery("select * from table;");
%>

Web Content

<table>
<%
    while(rs.next()){
%>

<tr><td>

<%=resultset_name.getString("dababase_field")%>

</td><tr>

<%
    }
s.close();
rs.close();
%>

</table>
</BODY>
</HTML>

pgsql-novice by date:

Previous
From: "Diego A. Puertas F."
Date:
Subject: Re: psql won't start
Next
From: webadmin
Date:
Subject: geometric type: path