일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- postcodify
- 마우스오른쪽
- 무료사이트
- 자바키워드
- 무료
- 우체국 우편번호
- php호스팅
- 새우편번호
- 웹호스팅
- 무료 웹 호스팅
- 퍼빌리셔
- 웹퍼블리싱
- 마우스 오른쪽 버튼
- php
- 글자뒤집기
- 무료홈페이지
- 클릭해제
- 무료호스팅
- 문자열 뒤집기
- 무료제작
- 무료 홈페이지
- 복사방지
- 호스팅
- 무료서버
- 무료 홈페이지 제작
- 홈페이지제작
- 우편번호 API
- 웹퍼블리셔
- 자바스크립트
- 무료 호스팅
Archives
- Today
- Total
Developer Factory
Tomcat 에 MySQL DBCP Example , UTF-8 사용하기 본문
Tomcat 에 MySQL DBCP Example
http://tomcat.apache.org/tomcat-7.0-doc/jndi-datasource-examples-howto.html
Context configuration
Configure the JNDI DataSource in Tomcat by adding a declaration for your resource to your Context.
For example:
<Context>
<!-- maxActive: Maximum number of database connections in pool. Make sure you
configure your mysqld max_connections large enough to handle
all of your db connections. Set to -1 for no limit.
-->
<!-- maxIdle: Maximum number of idle database connections to retain in pool.
Set to -1 for no limit. See also the DBCP documentation on this
and the minEvictableIdleTimeMillis configuration parameter.
-->
<!-- maxWait: Maximum time to wait for a database connection to become available
in ms, in this example 10 seconds. An Exception is thrown if
this timeout is exceeded. Set to -1 to wait indefinitely.
-->
<!-- username and password: MySQL username and password for database connections -->
<!-- driverClassName: Class name for the old mm.mysql JDBC driver is
org.gjt.mm.mysql.Driver - we recommend using Connector/J though.
Class name for the official MySQL Connector/J driver is com.mysql.jdbc.Driver.
-->
<!-- url: The JDBC connection url for connecting to your MySQL database.
-->
<Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="javauser" password="javadude" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/javatest"/>
</Context>
Tomcat 에 UTF-8 사용하기
URIEncoding=”UTF-8″ 설정을 입력하신 후 서버를 재시작 하시면 됩니다.
2 3 4 5 | <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8" /> <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" URIEncoding="UTF-8" /> |
'Developer > DBMS' 카테고리의 다른 글
MyBatis/iBatis - 방금 INSERT 된 Key 가져오기 (1) | 2014.07.04 |
---|---|
update, insert문을 select로 가져와서 활용하기 (0) | 2014.07.03 |
모델링 (0) | 2014.06.23 |
스프링과 DB 연동 한글 깨짐 (맵북에서 한글 연동 안될때...) (0) | 2014.06.23 |
MySQL 에서 IF문 사용하기 (0) | 2014.06.18 |