1 Reply Latest reply on Oct 28, 2001 7:16 AM by Anat

    res-ref for DataSource in war possible??

    Jose Gonzalez Newbie

      Hi there,

      I wanted to deploy an application in JBoss/Tomcat so I could be able to access a database from one of my servlets. I use res-ref to declare the DataSource reference in my web.xml file, but as long as I know, connecting this reference to a DataSource managed by JBoss means having a corresponding res-ref entry in jboss.xml. But this file is only included in EJB's jars, am I wrong?

      So how can I access a DataSource from one of my servlets?

      (I haven't make any try to make this work, so maybe I'm asking something stupid?)

      Regards
      Jose

        • 1. Re: res-ref for DataSource in war possible??
          Anat Newbie

          You should put it in jboss-web.xml file which should be placed in WEB-INF.

          > Hi there,
          >
          > I wanted to deploy an application in JBoss/Tomcat so
          > I could be able to access a database from one of my
          > servlets. I use res-ref to declare the DataSource
          > reference in my web.xml file, but as long as I know,
          > connecting this reference to a DataSource managed by
          > JBoss means having a corresponding res-ref entry in
          > jboss.xml. But this file is only included in EJB's
          > jars, am I wrong?
          >
          > So how can I access a DataSource from one of my
          > servlets?
          >
          > (I haven't make any try to make this work, so maybe
          > I'm asking something stupid?)
          >
          > Regards
          > Jose