Possible Duplicate:
How to change database settings for a deployed war file?
OK I will outline the steps:
- I do开发者_如何转开发wnloaded a perfectly functioning WAR fIle
- Uncompressed it
- Changed the database settings in the Database.properties file
- Made it a WAR file again
- Imported it in Eclipse IDE using File -> Import
- 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:
- Did you downloaded the WAR file from a production environment?
- Does the WSDL-generated client refer to that production environment?
- 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.
精彩评论