This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi every one
I have configured tomcat with eclipse and made an struts application. i want to connect this to database using jndi. In which xml i have to write configuration.
my application workspace is out of webapp folder of tomacat6.
Welcome to the JavaRanch, sanjay, although we really could do without the red ink!
Eclipse doesn't factor into this. You should be OK with your META-INF/context.xml file, but since you aren't placing the WAR in the Tomcat webapps folder, you need to tell Tomcat where you did put it. CATALINA_HOME is a bad location, so I'm going to make up a location inside an Eclipse project. The exact location will vary, depending on how your system is set up, but this is typical:
Copy this file as "mywebapp.xml" into CATALINA_HOME/conf/Catalina/localhost/ and Tomcat will deploy it, including the configuration of your JDBC connection pool and its JNDI resource registration. The exact name you use for your external context doesn't really matter, but since there's only room in a directory for one file of a given name, I picked "mywebapp.xml" to make it distinct.
An IDE is no substitute for an Intelligent Developer.