You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by me...@assetmanagement.natexis.fr on 2003/06/03 16:39:07 UTC

Réf. : DataSource configuration in web.xml insteadof server.xml AGAIN !

is this question
1)  off topic
2)  not understandable
3) already posted in the list
4) or stupid

not to require someone's attention.
in case of
 3 : I do apologize,but I've searched the list before, in vain
 2 : I'm sorry for my poor english
 else
     keep on ignoring, I won't disturb anymore.

Meissa




meissa.Sakho@assetmanagement.natexis.fr
03/06/2003 13:32
Veuillez répondre à "Tomcat Users List"


        Pour :  tomcat-user@jakarta.apache.org
        cc :
        Objet : DataSource configuration in web.xml instead of server.xml



hi all,

I 've configured my DataSource configuration within a DefaultContext in
the server.xml file in tomcat(4.1). Everything works fine.


Now I would like to move this configuration in the web.xml file. The
datasource section
in the documentation explains that is's possible.

I use DBCP api.

here is an extract of my server.xml datasource configuration.

<DefaultContext>

            <Resource name="jdbc/raise" auth="Container"
                    type="javax.sql.DataSource"/>

          <ResourceParams name="jdbc/raise">
 <parameter><name>username</name><value>raisepartner</value></parameter>
 <parameter><name>password</name><value>pwd4rpd</value></parameter>
            <parameter><name>driverClassName</name>
              <value>com.sybase.jdbc2.jdbc.SybDriver</value></parameter>
            <parameter><name>url</name>
 <value>jdbc:sybase:Tds:s198000WEBD:4100/raise_partner</value></parameter>


          </ResourceParams>

 </DefaultContext>

I guess, I must put those line below in the web.xml file



<web-app>

  <resource-ref>
     <res-ref-name>jdbc/raise</res-ref-name>
     <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
  </resource-ref>

how must I specify the other parameters(username,password ...).

any help would appreciated.

Meissa






L'integrite de ce message n'etant pas assuree sur internet, Natexis
Banques Populaires ne peut etre tenu responsable de
son contenu. Toute utilisation ou diffusion non autorisee est
interdite. Si vous n'etes pas destinataire de ce message, merci de le
detruire et d'avertir l'expediteur.

The integrity of this message cannot be guaranteed
on the Internet. Natexis Banques Populaires can not therefore be
considered responsible for the contents.Any unauthorized use or
dissemination is prohibited.
If you are not the intended recipient of this message, then please delete
it and
notify the sender.



L'integrite de ce message n'etant pas assuree sur internet, Natexis
Banques Populaires ne peut etre tenu responsable de
son contenu. Toute utilisation ou diffusion non autorisee est
interdite. Si vous n'etes pas destinataire de ce message, merci de le
detruire et d'avertir l'expediteur.

The integrity of this message cannot be guaranteed
on the Internet. Natexis Banques Populaires can not therefore be
considered responsible for the contents.Any unauthorized use or dissemination is prohibited.
If you are not the intended recipient of this message, then please delete it and
notify the sender.