Tomcat
If you’re using netbeans to develop Java, download .zip version which include complete .bat files in folder bin.
https://tomcat.apache.org/download-70.cgi
Add JDBC connection configs in context.xml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
<Context> <!-- Default set of monitored resources --> <WatchedResource>WEB-INF/web.xml</WatchedResource> <!-- Uncomment this to disable session persistence across Tomcat restarts --> <!-- <Manager pathname="" /> --> <!-- Uncomment this to enable Comet connection tacking (provides events on session expiration as well as webapp lifecycle) --> <!-- <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" /> --> <Resource name="jdbc/broadcast" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000" username="xxxx" password="xxxx" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://127.0.0.1:3306/dbname?autoReconnect=true&autoReconnectForPools=true&useUnicode=true&characterEncoding=UTF-8"/> </Context> |
Environment Variables
- JAVA_HOME
C:\Program Files\Java\jdk1.8.0_201 - CATALINA_HOME
D:\tomcat-7 - Append paths to variable path:
%JAVA_HOME%\bin
%CATALINA_HOME%\bin
User Environment variables
- CLASSPATH
%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\javaee-endorsed-api-7.0.jar