> From: Adam Posner [mailto:cuco2...@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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to