Eclipse-Tomcat - Context-environment-variable

Verwende ich eclipse + tomcat + maven.

Bereitstellen, wenn ich mein Projekt auf dem Tomcat der folgende Eintrag Hinzugefügt wird, der server.xml der tomcat-Konfiguration:

<Context docBase="C:\ws_eclipse\ws\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\MyApp" path="/myApp" reloadable="true" source="org.eclipse.jst.jee.server:MyApp"/>

Was ich eigentlich will, ist eine Umgebungsvariable hinzufügen, so dass der Kontext sieht so aus:

  <Context docBase="C:\ws_eclipse\ws\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\MyApp" path="/myApp" reloadable="true" source="org.eclipse.jst.jee.server:MyApp">
       <Environment name="config.file" type="java.lang.String" value="C:/test/config.xml" /> 
</Context>

Habe ich versucht, indem es als eine environment-variable in eclipse run configuration, aber wenn ich bereitgestellt, die Anwendung auf einem tomcat, der Kontext beinhaltet nicht die environment-variable.

InformationsquelleAutor saravana_pc | 2012-06-29
Schreibe einen Kommentar