You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tangy Verdell <ta...@gardell.com> on 2001/11/09 17:19:09 UTC

jndi datasource resolution

I couldn't use jndi to get my jdbc datasource working with TomcCat 4.01. I went to this mailing list and found no help. I did see a lot of people with my same problem.

The datasource is null.

To fix it, I had to create a context for my application in my server.xml file. In the JNDI HOW-TO, it specifies you can put your resource configuration within the context parameters. However, you also have to put it in the context of your application. This is something that newbies like myself didn't know. Here is an example of my configuration. Hope this saves someone some time.



 <Context path="/postgresql" docBase="postgresql"
         debug="0" privileged="true">

<Resource name="jdbc/ajug" auth="Container"

            type="javax.sql.DataSource"/>

  <ResourceParams name="jdbc/ajug">

    <parameter>

      <name>user</name>

      <value>postgres</value>

    </parameter>

    <parameter>

      <name>password</name>

      <value>postgres</value>

    </parameter>

    <parameter>

      <name>driverClassName</name>

      <value>org.postgresql.Driver</value>

    </parameter>

    <parameter>

      <name>driverName</name>

      <value>jdbc:postgresql://192.168.1.1/ajug</value>

    </parameter>

  </ResourceParams>


        </Context>
==============
Tangy Verdell
tangy@gardell.com

Tomcat 4.0.1 and IIS redirection

Posted by Surya Saraff <su...@yahoo.com>.
Hi,
has anyone used isapi_redirect.dll for installing
Tomcat 4.0.1 on IIS Server?  I have jsp files, they
just work fine without me having to install the
redirect dll.  Do I actually need it for Tomcat 4.0.1?
Can anyone guide me?  If it is actually needed, then
how my jsp files are working, and when is it actually
needed.

thanks
surya

__________________________________________________
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: jndi datasource resolution

Posted by Richard Troy <rt...@ScienceTools.com>.
> Date: Fri, 9 Nov 2001 11:19:09 -0500
> From: Tangy Verdell <ta...@gardell.com>
> Subject: jndi datasource resolution
>
> I couldn't use jndi to get my jdbc datasource working with TomcCat
> 4.01. I went to this mailing list and found no help. I did see a lot
> of people with my same problem.
>
> The datasource is null.
>
> To fix it, I had to create a context for my application in my
> server.xml file. In the JNDI HOW-TO, it specifies you can put your
> resource configuration within the context parameters. However, you
> also have to put it in the context of your application. This is
> something that newbies like myself didn't know. Here is an example of
> my configuration. Hope this saves someone some time.

Tangy,

THANK YOU THANK YOU THANK YOU!

I have been strugling with this very problem for the last week - finally
posted asking for help last night! Then -poof!- there's your mail!

Thank you for taking the time to post this to the list. I'm sure I'm not
the only one you have helped!

Regards,
Richard


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>