Francis Judge wrote:
> I'm editing the context.xml in the application's MET-INF directory. The
> following is what it contains:
> Resource name="*DB/TMS*" auth="*Container*"
> type="*javax.sql.DataSource*" username="*********" password="*********"
> driverClassName="*net.sourceforge.jtds.jdbcx.JtdsDataSource*"
> url="*jdbc:jtds:sqlserver://localhost:1433;DatabaseName=TMS*"
> maxActive="*8*" maxIdle="*1*" removeAbandoned="*true*"
> I have not set the 'unpackWARs' option anywhere but I deploy through the
> tomcat administrative console.

You are editing the wrong file. When a web application is first
deployed, any META-INF/context.xml is copied to
CATALINA_BASE/conf/<enginename>/<hostname> (usually
CATALINA_BASE/conf/Catalina/localhost) and renamed to appName.xml. Eg
for a war file named myapp.war a META-INF/context.xml would be renamed
to myapp.xml#

Edit the copy of the context.xml file and all will work as you expect.

Mark


> Mark Thomas wrote:
>> Francis Judge wrote:
>>  
>>> I am using Tomcat 6.0.18 and am using jTDS to connect to SQL Server
>>> 2005. The application is working fine in development (I'm using Netbeans
>>> 6.5) and I build the WAR from the IDE at the moment. When I deploy the
>>> WAR to the test server
>>>     
>>
>> How do you deploy your WAR? Is unpackWARs true or false?
>>
>>  
>>> I update the context.xml to point the database
>>>     
>>
>> Exactly which file do you edit?
>>
>>  
>>> connection URL to the testing SQL Server, and restart the application
>>> server. But, the DataSource is still using the settings from the WAR
>>> that I deployed and not reading the new values that I changed in the
>>> context.xml. If I put the testing details into the context.xml before I
>>> build the WAR then they are the ones used and everything works
>>> correctly. Surely this is not how Tomcat is intended to behave?
>>>     
>>
>> It may not be how you intended Tomcat to behave. How Tomcat should
>> behave will depend on the answers to the questions above.
>>
>> Mark
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
>>
>>   
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to