tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <d...@cornell.edu>
Subject Re: Tomcat 4 with Postgres 7.1
Date Wed, 31 Oct 2001 15:22:43 GMT
The "URL" as used here means Universal Resource Locator aka URI (Universal 
Resource Identifier).  It's a standardized syntax for defining where to find 
resources and doesn't always have to do with web content.  In this case, 
we're telling Tomcat to connect via JDBC to the PostgreSQL database at 
localhost and use the database 'authority' to get user authentication info.

You will also have to make another table in addition to 'users' named 
'user_roles'.  It should have two columns: 'users' and 'user_roles'.

One note on PostgreSQL:  If postmaster wasn't started with the -i option, you 
will have to restart it with that since JDBC does not recognize UNIX domain 
sockets and postmaster by default does not offer a TCP/IP listen port.  Test 
it with psql -h localhost -U test -W authority.  If you connect and 
authenticate with password test, you've just done exactly what the JDBC 
driver is going to do and everything should be set.  Just make sure you 
secure your db before making it available to the world with effective 
passwords, privileges, and a firewall.

Hope this helps clear it up a bit.

--David Smith

On Tuesday 30 October 2001 08:35 pm, you wrote:
> Dear All.
>
> Can smbd help me to setup Tomcat 4 with Postgres 7.1?
> I'm so stupid, I can't understand some things.
>
> To use Java/JSP with DB (Tomcat's Realm, Postgres) to check authorities
> I should:
> 1. Make DB with table containing user_name and user_pass
> 2. Install JDBC driver for Postgres
> ---- It's ok.
> 3. Edit "server.xml":
>
> <Realm  className="org.apache.tomcat.request.JDBCRealm" debug="99"
>               driverName="org.postgresql.Driver"
>
> connectionURL="jdbc:postgresql://localhost/authority?user=test;password=tes
>t" userTable="users" userNameCol="user_name"
> userCredCol="user_pass"
>               userRoleTable="user_roles" roleNameCol="role_name" />
>
> And what's the string: connectionURL
> Does it mean, that I should put user's DB into the root www catalog??????
> How and where Tomcat can find my user's table?
>
> Thanks, Max
>
>
>
> --
> To unsubscribe, e-mail:  
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org> For additional
> commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message