Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Suche Jetty pendant eines Context Path zu einer webapp zu apache-tomcat

Empfohlene Antworten

Veröffentlicht

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

  • 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.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.