Veröffentlicht 27. März 201213 j Hallo, der apache-tomcat kann das hier: Quelle: Apache Tomcat Configuration Reference - The Context Container ... Context elements may be explicitly defined: In the $CATALINA_HOME/conf/context.xml file: the Context element information will be loaded by all webapps. In the $CATALINA_HOME/conf/[enginename]/[hostname]/context.xml.default file: the Context element information will be loaded by all webapps of that host. In individual files (with a ".xml" extension) in the $CATALINA_HOME/conf/[enginename]/[hostname]/ directory. The name of the file (less the .xml) extension will be used as the context path. Multi-level context paths may be defined using #, e.g. foo#bar.xml for a context path of /foo/bar. The default web application may be defined by using a file called ROOT.xml. ... Im apache-tomcat macht man das so in conf/context.xml: <Context docBase="/path/release/ROOT.war" path="/webapp/test"> So etwas Suche ich nun schon seit 2 Tagen für den jetty. Dieser Link hier hat mir nicht weitergeholfen: Jetty/Howto/SetContextPath - Eclipsepedia Weil er leider nicht beschreibt, wie ich den Pfad zum war File angeben kann. Diverse Tests haben mich leider auch nicht weitergebracht. Z.B. soetwas in jetty/contexts/context.xml führt nicht dazu, dass der Jetty in /tmp/Jetty.... über die URL http://server:8888/webapp/test erreichbar ist > <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <!-- Required minimal context configuration : --> <!-- + contextPath --> <!-- + war OR resourceBase --> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <Set name="contextPath">/webapp/test</Set> <Set name="war"><SystemProperty name="jetty.home" default="."/>/webapps/ROOT.war</Set> Wer kann mir bitte helfen? Viele Grüße
28. März 201213 j Autor Hallo Gemeinde, ich habe es nun zum Glück mit Hilfe eines Kollegen herausgefunden: 1. ensure in jetty/start.ini that a jetty-deploy.xml is configured etc/jetty-deploy.xml 2. change jetty/etc/jetty-deploy.xml to <Set name="scanInterval">0</Set> 3. create a new context.xml <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd"> <Configure class="org.eclipse.jetty.webapp.WebAppContext"> <Set name="contextPath">/webapp/test</Set> <Set name="war"><SystemProperty name="jetty.home" default="."/>/webapps/test.war</Set> <Set name="extractWAR">true</Set> </Configure> 4. create a symlink in jetty/contexts-available named context.xml to your path 5. create a symlink in jetty/contexts named context.xml to ../contexts-available/context.xml 6. restart jetty
Archiv
Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.