You should only put the datasource in server.xml if you intend to make it available to multiple webapps as a common definition. Otherwise, set up a context xml file in CATALINA_HOME/conf/Catalina/localhost for the specific webapp that uses it. Alternatively, you can create a META-INF/context.xml file and store it in your WAR.
Here's one I have embedded in an application Context:
I have a web.xml entry to go with it - and that may be what you're missing.
I then use the JDNI key java:/comp/env/jdbc/myDS to locate it.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Nov 25, 2008
here i change my project as below.now my classes are like these.