tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: Realm configuration issues
Date Mon, 07 Sep 2009 19:33:00 GMT
> From: Adam Posner [mailto:cuco2772@gmail.com]
> Subject: Re: Realm configuration issues
> 
> I tried commented out everything between the context tags in
> server.xml and put it in context.xml like this:

What context.xml?  Be specific as to the location.

> It broke it; I got a parse error(NullPointerException) in context.xml
> line 21.

I don't see anything in particular wrong with what you posted; is that an exact copy &
paste, or is it subject to transcription errors?

> This brings me to the question about the resource element.
> Where should that be put ?

As the documentation for DataSourceRealm states, you may place the <Resource> inside
the <Context> element, as long as you set the localDataSource attribute for the <Realm>
to "true".

> Do I still need that <Resource element above to be defined somewhere,

Yes - the <Realm> needs to use it.

> <resource-ref>
>     <description>DB Connection</description>
>     <res-ref-name>jdbc/trailsDB</res-ref-name>
>     <res-type>javax.sql.DataSource</res-type>
>     <res-auth>Container</res-auth>
> </resource-ref>

The <resource-ref> shouldn't be used, since it's the <Realm> that needs the JDBC
connection, not your webapp.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus
for use only by the intended recipient. If you received this in error, please contact the
sender and delete the e-mail and its attachments from all computers.


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


Mime
View raw message