Deploy with War, web app archive
Local
- java
- MySQL DB
- Tomcat server
- jsp-page
Public
- AWS
- Elastic
- Beanstalk
Tomcat VM Option
-DJDBC_CONNECTION_STRING=jdbc:mysql://database
-DJDBC_USER=user
-DJDBC_PASSWORD=password
then configure jdbc connection
String DB_url=System.getProperty("JDBC_CONNECTION_STRING"); String DB_user=System.getProperty("JDBC_USER"); String DB_password=System.getProperty("JDBC_PASSWORD"); Connection conn = null; conn = DriverManager.getConnection(DB_url,DB_user,DB_password);