Tomcat5.0 and tomcat5.5 have different configurations.

Source: Internet
Author: User

Every project will go through the database for a while. It was previously well handled, because it is based on tomcat (a very useful JSP running platform) 5.0, whether it's with ORCALE SQLSERVER2000 or MySQL (the best combination with PHP), I 've got used to N for a long time. but I never expected to use tomcat (a very useful JSP running platform) 5.5 to get this. I am used to using tomcat (a very useful JSP running platform) 5.5 only in proxool. xml (standardization is getting closer and closer. however, I always believe that tomcat (a very useful JSP running platform) 5.5 can be used in all modes. because the configuration is only one way.
I got a day yesterday and finally used the database to report the error "Cannot create JDBC driver of class for connect URL null. I thought that the configuration file must be wrong in the same way as before. I found that no half of the words were written wrong for a long time.
I checked on the Internet. I have met many of my brothers and I, but I have not succeeded in trying it out according to a brother.
We have XXX in tomcat (a very useful JSP running platform) _ HOMEconfCatalinalocalhost in tomcat (a very useful JSP running platform) 5.0. in xml (standardization is getting closer and closer), the database path is configured in this way.
<? Xml (standardization is getting closer and closer) version = 1.0 encoding = UTF-8?>
<Context docBase = "D: eclipseworkspaceBKGMS" path = "/BKGMS" reloadable = "true" workDir = "D: eclipseworkspaceBKGMSworkorgapache (the most popular WEB server platform on Unix) jsp (preferred for SUN Enterprise Applications) ">
<Resource auth = "Container" name = "RedstoneSql" type = "javax. SQL. DataSource"/>
<ResourceParams name = "better">
<Parameter>
<Name> factory </name>
<Value> org. apache (the most popular WEB server platform on the Unix platform). commons. dbcp. BasicDataSourceFactory </value>
</Parameter>
<Parameter>
<Name> url </name>
<Value> jdbc: microsoft: sqlserver: // 127.0.0.1: 1433; DatabaseName = bkgms </value>
</Parameter>
<Parameter>
<Name> password </name>
<Value> sa </value>
</Parameter>
<Parameter>
<Name> maxWait </name>
<Value> 10000 </value>
</Parameter>
<Parameter>
<Name> maxActive </name>
<Value> 100 </value>
</Parameter>
<Parameter>
<Name> driverClassName </name>
<Value> com. microsoft. jdbc. sqlserver. SQLServerDriver </value>
</Parameter>
<Parameter>
<Name> username </name>
<Value> sa </value>
</Parameter>
<Parameter>
<Name> maxIdle </name>
<Value> 30 </value>
</Parameter>
</ResourceParams>
</Context>
In <Resource auth = "Container" name = "better" type = "javax. SQL. <ResourceLink global = "better" name = "better" type = "javax. SQL. dataSource "/>.
However, an unable to get connection: no suitable driver is reported after tomcat (a very useful JSP running platform) is restarted.
I am relying on it. I think it is not feasible. Check it again. most of the brothers have said that tomcat (a very useful JSP running platform) 5.5 and tomcat (a very useful JSP running platform) 5.0 have different configurations.
Since tomcat (a very useful JSP operating platform) 5.5 and later, the <Resoucepram> element of the <context> element is canceled, and the original Parameter Element is displayed as the Resouce attribute.
But you should write it like this. By the way, add <ResourceLink>
<? Xml (standardization is getting closer and closer) version = 1.0 encoding = UTF-8?>
<Context docBase = "D: eclipseworkspaceBKGMS" path = "/BKGMS" reloadable = "true" workDir = "D: eclipseworkspaceBKGMSworkorgapache (the most popular WEB server platform on Unix) jsp (preferred for SUN Enterprise Applications) ">
<Resource auth = "Container" name = "better" type = "javax. SQL. dataSource "maxWait =" 10000 "maxIdle =" 30 "maxActive =" 100 "username =" sa "password =" sa "driverClassName =" com. microsoft. jdbc. sqlserver. SQLServerDriver "url =" jdbc: microsoft: sqlserver: // 127.0.0.1: 1433; DatabaseName = bkgms "/>
<ResourceLink global = "better" name = "better" type = "javax. SQL. DataSource"/>
</Context>
1. path indicates the URL entry for accessing the web application;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.