You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by sam wun <sw...@gmx.com> on 2008/08/19 14:29:49 UTC
establsh remote db connection
Hi,
I triedto follow the tutorial shown in the link below
http://java.sys-con.com/node/152270
but I amstuck with the mysql location.
I haveinstalled mysql database engine in a linux server.
Thetutorial I am following on is started in windows Vista with Eclipse 3.4,
it assumed we installed mysql in the local system (windows ).
I havedownloaded its tutorial files in a zip file and saved them in windows
vista.
The list1 file is also shown below:
xml version='1.0' encoding='utf-8'?>
<Context displayName="DBTest" docBase="C:/Program Files/Apache Software
Foundation/Tomcat 5.0/webapps/DBTest" path="/DBTest"
workDir="work\Catalina\localhost\DBTest">
<Resource auth="Container" description="DB Connection"
name="jdbc/TestDB" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/TestDB">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost/test?autoReconnect=true</value>
</parameter>
<parameter>
<name>password</name>
<value></value>
</parameter>
<parameter>
<name>maxActive</name>
<value>100</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>5000</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>com.mysql.jdbc.Driver</value>
</parameter>
<parameter>
<name>username</name>
<value>ODBC</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>2</value>
</parameter>
</ResourceParams>
</Context>
where should I make change in this file in order to make this project look
for db connection in my linux box?
Thanks
Re: java version in windows and tomcat server
Posted by Len Popp <le...@gmail.com>.
No, it will not work. If you compile with a new compiler you need a
new JRE to run it.
You can tell Eclipse to compile the code for an older JRE. The setting
is in Project > Properties > Java Compiler.
--
Len
On Tue, Aug 19, 2008 at 09:44, sam wun <sw...@gmx.com> wrote:
> Hi,
>
> when I create a web project in windows Eclipse (3.4), I use jre6.
>
> But in my tomcat server (linux), it s using jre5.
>
> Do I have to make the jre version to be the same for both platforms?
>
> Because if I package it in a war file in windows, the lib jar files are
> all in jre6 version.
>
> Then when I deploy this war file to the tomcat server, will it still work?
>
>
>
> Thanks
>
>
>>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
java version in windows and tomcat server
Posted by sam wun <sw...@gmx.com>.
Hi,
when I create a web project in windows Eclipse (3.4), I use jre6.
But in my tomcat server (linux), it s using jre5.
Do I have to make the jre version to be the same for both platforms?
Because if I package it in a war file in windows, the lib jar files are
all in jre6 version.
Then when I deploy this war file to the tomcat server, will it still work?
Thanks
>