<?xml version="1.0" encoding="UTF-8" ?> <Context displayName="MarugotoJ2EE" docBase="marugoto" path="/marugoto" reloadable="true"> <Resource name="jdbc/Marugoto" auth="Container" type="javax.sql.DataSource" username="jusr" password="jpass" driverClassName="org.gjt.mm.mysql.Driver" url="jdbc:mysql://localhost/marugoto?useUnicode=true&characterEncoding=sjis" maxActive="20" maxWait="10000" maxIdle="10" validationQuery="SELECT count(*) FROM artist" /> </Context>
<?xml version="1.0" encoding="UTF-8" ?> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> <resource-ref> <res-ref-name>jdbc/Marugoto</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> </web-app>
jdbc:subprotocol://subname
//hostName/dbName[?attribute]