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
> (I haven't make any try to make this work, so maybe
> I'm asking something stupid?)