下面是tomcat的context文件
<?xml version='1.0' encoding='utf-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- The contents of this file will be loaded for each web application -->
<Context reloadable="true"> <!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<Resource name="jdbc/oracleds" auth="Container"
type="javax.sql.DataSource" maxActive="100" maxIdle="30"
maxWait="10000" username="scott" password="tiger"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@localhost:8088:1521:ora9"/>
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<!--
<Manager pathname="" />
--> <!-- Uncomment this to enable Comet connection tacking (provides events
on session expiration as well as webapp lifecycle) -->
<!--
<Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
--></Context>
tomcat的lib文件夹中也放上ojdbc6.jar和classes12.jar文件了但是还不行
急求高手指点,自己研究两天了还没弄出来
<?xml version='1.0' encoding='utf-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- The contents of this file will be loaded for each web application -->
<Context reloadable="true"> <!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<Resource name="jdbc/oracleds" auth="Container"
type="javax.sql.DataSource" maxActive="100" maxIdle="30"
maxWait="10000" username="scott" password="tiger"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@localhost:8088:1521:ora9"/>
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<!--
<Manager pathname="" />
--> <!-- Uncomment this to enable Comet connection tacking (provides events
on session expiration as well as webapp lifecycle) -->
<!--
<Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
--></Context>
tomcat的lib文件夹中也放上ojdbc6.jar和classes12.jar文件了但是还不行
急求高手指点,自己研究两天了还没弄出来
解决方案 »
- service注入空指针,求找错!!!
- 后台所有修改,都修改不了,请高手指教呀
- tomcat设置为4G内存不能启动,怎么在tomcat上设置大内存?
- [SQLServer 2000 Driver for JDBC]Column index 2 is out of range.这是什么原因阿?
- java跨平台??
- java能和WinWebMail整合么?
- 空表单提交时,打印都不为空,除了中文显示几个问好(选择框),都看不到值.编码都设置过,为GBK,网页中文没问题
- 知道的说下session get问题
- 500分请教:jive论坛+如何设置才能搜索中文?
- jsp新手请教
- jsp中${pageviewPetname}是什么意思
- 请教个问题,求解答,小弟谢谢各位了
改为url=jdbc:oracle:thin:@localhost:1521:ora9,确定oracle的服务名是ora9。。
2. 除了这个以外,,在程序中使用的时候还要在web.xml中配置。。
如:
<resource-ref>
<description>DB connect</description>
<res-ref-name>jdbc/oracleds</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
那请问那里要是不写tomcat的端口那应该些什么。