You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Alessandro Ilardo <al...@my-sandro.net> on 2007/01/30 12:33:58 UTC

REALM and JNDI configuration

I'm having some trouble when I attempt to authenticate myself into my 
web application using the REALM.
I always get the error login page. Would you have a look on my 
configuration reported belowe as for the first time I'm trying to 
connect it to the database via JNDI.
Thanks in advance for you support.

<?xml version="1.0" encoding="UTF-8"?>
<Context path="/allysia" reloadable="true">
    <Resource name="jdbc/allysiaDB" auth="Container" 
type="javax.sql.DataSource"
    username="allysia" password="xxxxxxxxxxx"
    driverClassName="org.gjt.mm.mysql.Driver"
    url="jdbc:mysql://127.0.0.2:3306/test?autoReconnect=true" 
maxActive="100" maxIdle="30"
    maxWait="10000"/>
    <Realm className="org.apache.catalina.realm.DataSourceRealm"
    name="jdbc/allysiaDB" digest="MD5" localDataSource="true"
    debug="99" roleNameCol="role" userCredCol="password" 
userNameCol="username"
    userRoleTable="role" userTable="user"/>
    <Valve className="org.apache.catalina.valves.AccessLogValve"
    directory="logs"  prefix="allysia_access_log." suffix=".txt"
    pattern="common" resolveHosts="false"/>
</Context>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: REALM and JNDI configuration

Posted by Mikolaj Rydzewski <mi...@ceti.pl>.
Alessandro Ilardo wrote:
>    url="jdbc:mysql://127.0.0.2:3306/test?autoReconnect=true" 

Are you sure about the IP address? Maybe it should be 127.0.0.1?

Answer in the logs you will find...

-- 
Mikolaj Rydzewski <mi...@ceti.pl>