Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » deploy changes context file(deploying an app reformats Context undesirably)
deploy changes context file [message #694505] Fri, 08 July 2011 18:06
bpugh is currently offline bpughFriend
Messages: 1
Registered: July 2011
Junior Member
Summary:
When I deploy my WAR through eclipse the Context gets reformatted and removes some necessary elements of my file.

Background:
I have 3 environments: local, staging, and prod. In order to manage some variable that change between servers we have elected to place an xml file in the webapps directory of each server that doesn't change. This file sets some Environment variables by being included in the Context as follows:

(context.xml - in war/META-INF/)
-----------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE serverSpecifics [ <!ENTITY settings SYSTEM "/opt/tomcat-tbs/webapps/settings.xml"> ]>
<Context path="/" unpackWAR="false">
...
&settings;
...
</Context>
-----------------------------------------

(settings.xhtml - deployed in tomcat/webapps/)
-----------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<Environment name="debugMode" value="true" type="java.lang.Boolean" override="false"/>
...
-----------------------------------------

Problem:
If I export the war from eclipse and run Tomcat the context.xml file gets copied exactly as is to tomcat/config/Catalina/localhost/_____.xml, but if I deploy it in eclipse by adding the project it to my Tomcat server the file gets reformatted dropping the ENTITY declaration and the &settings; statement. This of course means that the settings.xml does not get included, and the Environment variable are not available.

Question:
Is there a way to get eclipse to NOT reformat the file?

Misc:
I can consider other options for server specific variables, but I don't want to change the configuration files everytime I build for a different server.

Environment:
Ubuntu Linux 64 bit
Eclipse Java EE IDE for Web Developers.
Version: Helios Release
Build id: 20100617-1415
Tomcat 6: apache-tomcat-6.0.26

[Updated on: Fri, 08 July 2011 18:11]

Report message to a moderator

Previous Topic:Eclipse IDE, Linux, Sun Ray
Next Topic:HOWTO : Indigo migration
Goto Forum:
  


Current Time: Thu Apr 25 21:07:30 GMT 2024

Powered by FUDForum. Page generated in 0.08073 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top