How can we configure JNDI using tomcat server?

How to configure JNDI using tomcat server similar to JBoss server using jboss-web.xml? Please help me with this?

I want to know which file we need to write? or is there any software way to do this?

Thanks Advance, Pravin

+5
source share
3 answers

Write context .xml

 <Context>
   <Resource name="jdbc/dbConnection" 
    auth="Container" 
    type="javax.sql.DataSource"
    driverClassName="com.mysql.jdbc.Driver" 
    url="j<url to database>" 
    username="user" 
    password="pwdt" 
    validationQuery="select 1" 
    removeAbandoned="true"
    removeAbandonedTimeout="120" 
    maxWait="60" 
    maxActive="20" 
    maxIdle="10" /> 
   </Context>
+11
source

Here 's Apache JNDI HOWTO on how to configure JNDI on Tomcat 6.

+1
source

JNDI - , docs. .

0

All Articles