This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- Re: Property file in WAR
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 26, 2008
09:26 AM
Property file in WAR
I want to deploy a WAR file to a Apache Tomcat host.
Inside this WAR file there is a property file under /WEB-INF/classes/server.properties
Is it possible to edit values in this server.properties inside the WAR archive before deploy to the Apache Tomcat host?
Or is there another approach to this common task?
Inside this WAR file there is a property file under /WEB-INF/classes/server.properties
Is it possible to edit values in this server.properties inside the WAR archive before deploy to the Apache Tomcat host?
Or is there another approach to this common task?
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 26, 2008
09:34 AM
you can use modify text file action to do any search/replace etc..
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 26, 2008
09:42 AM
Perhaps see if the Modify Text File - In Archive action will work for you?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 26, 2008
10:22 AM
I have tried to use the Action "Modify Text File - In Archive" under Install
From the InstallLog.log
Am I using the correct Action here? When I look at the help text I can read that this Action applies to ZIP or JAR. Is WAR type supported?
Any suggestions? :confused:
Installed Archive: $USER_INSTALL_DIR$$/$Server.war
Archive Path: /WEB-INF/classes/server.properties
From the InstallLog.log
Modify Text File - In Archive: Server.war
Status: ERROR
Additional Notes: ERROR - There was a problem editing C:\Program Files\Server\Server.war: java.util.zip.ZipException: Entry: /WEB-INF/classes/server.properties not found in zip
Am I using the correct Action here? When I look at the help text I can read that this Action applies to ZIP or JAR. Is WAR type supported?
Any suggestions? :confused:
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 26, 2008
10:31 AM
I haven't tried it, but the action seems to identify a .war file as a possible target archive; as a test, does it work if you rename the file to be a .jar or .zip file?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 27, 2008
04:46 AM
I get the same result when renaming the file from war to jar
I also tried to create a plain new zip file and having the server.properties file at the root level. The result
Then I tried to move server.properties to /WEB-INF/classes/ path in the same zip
Finally I changed /WEB-INF to WEB-INF (dropping the very first slash / )
SUCCESSFUL!!
This also worked on the .war file.
🙂
Modify Text File - In Archive: Server.jar
Status: ERROR
Additional Notes: ERROR - There was a problem editing C:\Program Files\Server\Server.jar: java.util.zip.ZipException: Entry: /WEB-INF/classes/server.properties not found in zip
I also tried to create a plain new zip file and having the server.properties file at the root level. The result
Modify Text File - In Archive: Server.zip
Status: SUCCESSFUL
Then I tried to move server.properties to /WEB-INF/classes/ path in the same zip
Modify Text File - In Archive: Server.zip
Status: ERROR
Additional Notes: ERROR - There was a problem editing C:\Program Files\Server\Server.zip: java.util.zip.ZipException: Entry: /WEB-INF/classes/server.properties not found in zip
Finally I changed /WEB-INF to WEB-INF (dropping the very first slash / )
SUCCESSFUL!!
This also worked on the .war file.
🙂