Server-managed datasources with Tomcat and WTP

If you need to configure a server-managed datasource for testing your webapp, and you happen to be using Eclipse WTP, this is what you need to do.

  1. Have your server definitions on the workspace.
  2. Deploy your app to the server.
  3. Open server.xml and find the application’s <Context>
  4. Nest your datasource definition inside the <Context>

If you need any other kind of <Resource> configured in your tomcat, you can proceed in the same way.

%d bloggers like this: