1,改目录权限
|
1
|
chmod
-R 777 wb
|
2,放mysql驱动jar到/usr/share/tomcat/lib
3,context.xml内容:
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
<?
xml
version
=
"1.0"
encoding
=
"UTF-8"
?>
<!DOCTYPE Context>
<
Context
reloadable
=
"true"
crossContext
=
"true"
>
<
WatchedResource
>WEB-INF/web.xml</
WatchedResource
>
<
Resource
name
=
"jdbc/wb_mysql"
auth
=
"Container"
type
=
"javax.sql.DataSource"
driverClassName
=
"com.mysql.jdbc.Driver"
url
=
"jdbc:mysql://127.0.0.1:3306/webBuilder?autoReconnect=true&allowMultiQueries=true&useUnicode=true&characterEncoding=utf-8&mysqlEncoding=utf8"
username
=
"root"
password
=
"0000"
factory
=
"org.apache.commons.dbcp.BasicDataSourceFactory"
maxActive
=
"20"
maxIdle
=
"10"
maxWait
=
"-1"
/>
</
Context
>
|
本文转自 zl1030 51CTO博客,原文链接:http://blog.51cto.com/zl1030/1747557