I’m new to IT and trying to figure out how to edit properties file inside the war file while deploying it in IBM websphere. I have a war file and it contains two properties file Web-inf/classes/database.properties and apps.properties? . It need to be edited before deploying the war file or can it be edited after deployment?
I have tried it in tomcat and in which I can edit it after unwrapping the war file but I’m not sure how to do it in IBM websphere.
You cannot edit these files easily during deployment.
Recommended way for database properties is to use DataSources defined on the server and then just JNDI name of resource ref in the application, which actually can be mapped to the server resource during deployment.
I dont know what is in your apps.props, but you really need to change them between environments then you could one of these:
You can manually edit these props in unpacked war location on the server, but I treat it as "last resort" and not really production quality solution, as if you for example map app to the different server/cluster all your changes would be lost.
You can also checkout old discussion about similar issue here best place to put properties file in IBM websphere 8.5?