server.xml
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" URIEncoding="UTF-8" />
appBase는 127.0.0.1/ 의 루트로 부터 상대경로를 뜻한다.
<Host name="127.0.0.1" appBase="/"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="Y:/0211_dev_workspace/WebContent" crossContext="true">
...
name의 dbname은 web.xml에서 사용하겠다고 디파인 해줘야 사용할 수 있다.
<Resource name="jdbc/dbname"
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
loginTimeout="10"
maxWait="5000"
username="root"
password="pas$w0rd"
testOnBorrow="true"
url="jdbc:mysql://127.0.0.1:3306/dbname" />
....
web.xml
<resource-ref>
<description>db</description>
<res-ref-name>jdbc/dbname</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
'오래된것' 카테고리의 다른 글
10년후엔 바람피겠어 (0) | 2012.07.03 |
---|---|
내직업에 절대로 불평하지 않겠어 (0) | 2012.07.03 |
federated 엔진 활성화 시키기 (0) | 2012.07.02 |
mysql auto_increment 초기화 (0) | 2012.06.29 |
이클립스 톰켓 플러그인 (0) | 2012.06.19 |