Yes, authority in the url is the name of the database being accessed. 
URL syntax looks something like this:

jdbc:mysql//[DNS_name|IP][:portNum]/database

portNum is 3306 if not specified and you can add a ? and connect options
after the database name as needed.

Hugh Morgan wrote:

> Franck Borel wrote:
>
>> Try this:
>>
>> <Context path="/minimal"
>>                docBase="minimal"
>>                debug="0"
>>                 reloadable="false"
>>                 crossContext="true">
>>
>> <Resource name="jdbc/authority" auth="Container"
>> type="javax.sql.DataSource"/>
>> <ResourceParams name="jdbc/authority">
>>     <parameter><name>username</name><value>root</value></parameter>
>>    
>> <paramater><name>password</name><value>ROOT_PASSWORD</value></parameter>
>>   
>> <parameter><name>driverClassName</name><value>com.mysql.jdbc.Driver</value></parameter>
>>
>>   
>> <parameter><name>url</name><value>jdbc:mysql://localhost/authority</value></parameter>
>>
>> </ResourceParams>
>> </Context>
>
>
> Same error (after changing paramater ;) ).  Did make me think though,
> what is authority?  Should I have cganged this (to the name of the
> database for example)?
>
> Thanks again,
>
> Hugh
>
>>
>> -- Franck
>>
>>
>>> Franck Borel wrote:
>>>
>>>> Where did you place your Realm block?
>>>>
>>>> It must be placed inside the context block like this:
>>>>
>>>> <Context ..>
>>>>    <Realm ...../>
>>>> </Context..>
>>>
>>>
>>> I did not have it here, I had it in the Engine tag.  I have now
>>> changed it, and stoped and restarted the server.  I still get the same
>>> error. The relavent bit of my server.xml file looks like this -
>>>
>>>    <Engine name="Catalina" defaultHost="localhost">
>>> ...
>>>      <!--
>>>      <Realm  className="org.apache.catalina.realm.JDBCRealm"
>>>             driverName="com.mysql.jdbc.Driver"
>>>          connectionURL="jdbc:mysql://localhost/authority"
>>>         connectionName="root" connectionPassword="ROOT_PASSWORD"
>>>              userTable="users" userNameCol="user_name"
>>> userCredCol="user_pass"
>>>          userRoleTable="user_roles" roleNameCol="role_name" />
>>>      -->
>>> ...
>>>      <Host name="localhost" appBase="webapps"
>>>       unpackWARs="true" autoDeploy="true"
>>>       xmlValidation="false" xmlNamespaceAware="false">
>>>        <Context path="/minimal" docBase="minimal" debug="0"
>>>                reloadable="false" crossContext="true">
>>>          <Realm  className="org.apache.catalina.realm.JDBCRealm"
>>>                  driverName="com.mysql.jdbc.Driver"
>>>                  connectionURL="jdbc:mysql://localhost/authority"
>>>                  connectionName="root"
>>> connectionPassword="ROOT_PASSWORD"
>>>                  userTable="users" userNameCol="user_name"
>>> userCredCol="user_pass"
>>>                  userRoleTable="user_roles" roleNameCol="role_name" />
>>>        </Context>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to