开发者

Why is my WAR file still referencing data from the old database server? [duplicate]

开发者 https://www.devze.com 2023-01-09 05:54 出处:网络
This question already has answers here: Closed 12 years ago. Possible Duplicate: How to change database settings for a deployed war file?
This question already has answers here: Closed 12 years ago.

Possible Duplicate:

How to change database settings for a deployed war file?

OK I will outline the steps:

  1. I do开发者_如何转开发wnloaded a perfectly functioning WAR fIle
  2. Uncompressed it
  3. Changed the database settings in the Database.properties file
  4. Made it a WAR file again
  5. Imported it in Eclipse IDE using File -> Import
  6. Ran a test client by right clicking the WSDL and selecting Web Services->Generate Client

Now when I insert data using the client, it is still entering that on the old server and not the new one. I am so lost in terms of modifying WAR files.


If you're using Tomcat, the only database settings relevant will probably be in your WAR file.

A couple of thoughts:

  1. Did you downloaded the WAR file from a production environment?
  2. Does the WSDL-generated client refer to that production environment?
  3. Did you deploy the WAR locally, so that you could test the new settings?

My (somewhat educated) guess is that your code in Eclipse is using your deployed code, not the modified WAR you're trying to test locally. You will probably have to deploy the WAR locally and ensure your test client uses the local server instead of the deployed location.

My apologies if any of my assumptions are off the mark.

0

精彩评论

暂无评论...
验证码 换一张
取 消