Configure Tomcat with Aurora PostgreSQL Endpoint
By default, the Tomcat server (server.xml) is configured with local PostgreSQL database. Now, you need to replace with Aurora PostgreSQL DB endpoint.
- Open C:\Program Files\Apache Software Foundation\Tomcat 9.0\conf\server.xml in the Notepad++.
- In the GlobalNamingResources section, replace:
- localhost with Aurora PostgreSQL endpoint
- password ‘VerySecret’ with postgres
- Save and close the server.xml file
Aurora PostgreSQL endpoint was captured in the previous chapter > Create Target Database under Create Aurora PostgreSQL Database section.
- Launch the Windows Services. Shortcut can be found either on the taskbar or desktop.
- Select Apache Tomcat 9.0 Tomcat9 and click on Stop, then Start Apache Tomcat 9.0 service.
- Once restarted, leave few minutes for all components to start and see the applications started running in the Tomcat manager
If there is a problem, you can investigate the logs at C:\Program Files\Apache Software Foundation\Tomcat 9.0\temp\spring.log. Alternatively, C:\Program Files\Apache Software Foundation\Tomcat 9.0\logs