Tomcat & DB接続
tomcatでDB接続。ちょっと苦労した。仕組みしらんとはまるなぁ。初心者万歳
C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\Catalina\localhost\remoting.xml
<Context path="/remoting" reloadable="true" docBase="C:\var\tomyhero\Remoting" workDir="C:\var\tomyhero\Remoting\work" > <Resource name="jdbc/tomyhero" auth="Container" type="javax.sql.DataSource" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://tomyhero.dev/dev_tomyhero?useUnicode=true&characterEncoding=UTF-8" username="tomyhero" password="tomyhero" maxActive="1" maxIdle="1" maxWait="3000" defaultAutoCommit="true" removeAbandoned="true" logAbandoned="true" /> </Context>