Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…oject into jetty-12.0.x-documentation-operations-logging

* 'jetty-12.0.x' of https://github.com/gregpoulos/jetty.project:
  Documentation: for consistency, convert "JETTY_HOME" attribute to "jetty-home" (jetty#9152)
  suppress test stacks
  Jetty 12 temp directory cleanup (jetty#9153)
  Only use GraalIssue5720PathResourceFactory when truly needed
  Refactor Graal native-image resource: handling
  Move GraalVM Native-Image code to NativeImagePathResource/-Factory
  PathResource: Fix "isAlias" issue with resource: URIs
  PathResource: Work-around false positive CodeQL warning
  PathResourceFactory: Ignore certain RuntimeExceptions upon init
  PathResource: Selectively enable resource: for GraalVM Native Image
  URIUtil: Removed unused code
  URIUtil: Suppress CodeQL false positive error about path injection
  util: Add support for GraalVM Native-Image resource:-URIs and Paths
  • Loading branch information
Greg Poulos committed Jan 17, 2023
2 parents 02e4b74 + 6d1e244 commit 38d4249
Show file tree
Hide file tree
Showing 62 changed files with 764 additions and 982 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
// See https://github.com/asciidoctor/asciidoctor-intellij-plugin/wiki/Support-project-specific-configurations
:experimental:
:imagesdir: images
:JETTY_HOME: ../../../../../../../jetty-home/target/jetty-home
:jetty-home: ../../../../../../../jetty-home/target/jetty-home
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ own custom link:https://docs.oracle.com/javase/7/docs/api/javax/security/auth/sp
Enable the `ee{8,9,10}-jaas` module appropriate for your EE platform:

----
include::{JETTY_HOME}/modules/ee10-jaas.mod[]
include::{jetty-home}/modules/ee10-jaas.mod[]
----

The configurable items in the resulting `$jetty.base/start.d/jaas.ini` file are:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Only modules conforming to the "Servlet Container Profile" with the ServerAuthMo
Enable the `jaspi` module:

----
include::{JETTY_HOME}/modules/ee10-jaspi.mod[]
include::{jetty-home}/modules/ee10-jaspi.mod[]
----

[[og-jaspi-xml]]
Expand All @@ -48,7 +48,7 @@ The following example uses Jetty's EE10 implementation of `AuthConfigProvider` t

[source, xml]
----
include::{JETTY_HOME}/etc/jaspi/jetty-ee10-jaspi-demo.xml[]
include::{jetty-home}/etc/jaspi/jetty-ee10-jaspi-demo.xml[]
----

Other custom or 3rd party modules that are compatible with the `ServerAuthModule` interface in JASPI can be registered in the same way.
Expand All @@ -66,5 +66,5 @@ This custom module must reference an XML file which sets a new instance of the `
For an example of this see the `ee{9,10}-jaspi-default-auth-config-factory` module, which provides the default implementation used by Jetty.

----
include::{JETTY_HOME}/modules/ee10-jaspi-default-auth-config-factory.mod[]
include::{jetty-home}/modules/ee10-jaspi-default-auth-config-factory.mod[]
----
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Jetty supports JSP via the `ee{8,9,10}-jsp` modules, which are based on Apache Jasper:

----
include::{JETTY_HOME}/modules/ee10-jsp.mod[]
include::{jetty-home}/modules/ee10-jsp.mod[]
----

Logging has been bridged to Jetty logging, so you can enable logging for the `org.apache.jasper` package, subpackages and classes as usual.
Expand Down Expand Up @@ -175,7 +175,7 @@ If the value you set doesn't take effect, try using all lower case instead of ca
The JavaServer Pages Standard Tag Library (JSTL) is part of the Jetty distribution, and is available via the `ee{8,9,10}-jstl` modules:

----
include::{JETTY_HOME}/modules/ee10-jstl.mod[]
include::{jetty-home}/modules/ee10-jstl.mod[]
----

When enabled, Jetty will make the JSTL tags available for your webapps.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ You can configure the list of application protocols negotiated by the ALPN mecha
The module properties are:

----
include::{JETTY_HOME}/modules/alpn.mod[tags=documentation]
include::{jetty-home}/modules/alpn.mod[tags=documentation]
----
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Excess buffers will not be pooled and will be eventually garbage collected.
The module file is `$JETTY_HOME/modules/bytebufferpool.mod`:

----
include::{JETTY_HOME}/modules/bytebufferpool.mod[]
include::{jetty-home}/modules/bytebufferpool.mod[]
----

Among the configurable properties, the most relevant are:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ Old, rolled files are kept for the number of days specified by the `jetty.consol
The module properties are:

----
include::{JETTY_HOME}/modules/console-capture.mod[tags=documentation]
include::{jetty-home}/modules/console-capture.mod[tags=documentation]
----
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Files or directories added in this monitored directory cause the `DeploymentMana
The module file is `$JETTY_HOME/modules/deploy.mod`:

----
include::{JETTY_HOME}/modules/deploy.mod[]
include::{jetty-home}/modules/deploy.mod[]
----

Among the configurable properties, the most relevant are:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ The `http-forwarded` module provides support for processing the `Forwarded` HTTP
The module properties are:

----
include::{JETTY_HOME}/modules/http-forwarded.mod[tags=documentation]
include::{jetty-home}/modules/http-forwarded.mod[tags=documentation]
----
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The `http` module provides the clear-text connector and support for the clear-te
The module properties to configure the clear-text connector are:

----
include::{JETTY_HOME}/modules/http.mod[tags=documentation]
include::{jetty-home}/modules/http.mod[tags=documentation]
----

Among the configurable properties, the most relevant are:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The `http2` module enables support for the secure HTTP/2 protocol.
The module properties are:

----
include::{JETTY_HOME}/modules/http2.mod[tags=documentation]
include::{jetty-home}/modules/http2.mod[tags=documentation]
----

// tag::rate-control[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The `http2c` module enables support for the clear-text HTTP/2 protocol.
The module properties are:

----
include::{JETTY_HOME}/modules/http2c.mod[tags=documentation]
include::{jetty-home}/modules/http2c.mod[tags=documentation]
----

include::module-http2.adoc[tags=rate-control]
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ The `http3` module enables support for the HTTP/3 protocol.
The module properties are:

----
include::{JETTY_HOME}/modules/http3.mod[tags=documentation]
include::{jetty-home}/modules/http3.mod[tags=documentation]
----
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ The `https` module provides the HTTP/1.1 protocol to the xref:og-module-ssl[`ssl
The module file is `$JETTY_HOME/modules/https.mod`:

----
include::{JETTY_HOME}/modules/https.mod[]
include::{jetty-home}/modules/https.mod[]
----
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The `jmx-remote` module provides remote access to JMX clients.
The module properties to configure remote JMX connector are:

----
include::{JETTY_HOME}/modules/jmx-remote.mod[tags=documentation]
include::{jetty-home}/modules/jmx-remote.mod[tags=documentation]
----

The system property `java.rmi.server.hostname` is specified with the usual notation, prepending a `-D` in front of the system property name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The `requestlog` module provides HTTP request/response logging in the standard l
The module properties are:

----
include::{JETTY_HOME}/modules/requestlog.mod[tags=documentation]
include::{jetty-home}/modules/requestlog.mod[tags=documentation]
----

The property `jetty.requestlog.formatString` can be customized using format codes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ See also the xref:og-protocols[protocols section] for more information about the
The module properties to configure generic HTTP properties are listed below. Mostly they frequently apply to HTTP/1, HTTP/2 and HTTP/3, but some parameters are version specific:

----
include::{JETTY_HOME}/modules/server.mod[tags=documentation-http-config]
include::{jetty-home}/modules/server.mod[tags=documentation-http-config]
----

Among the configurable properties, the most relevant are:
Expand All @@ -58,7 +58,7 @@ Server: Jetty({version})
The module properties to configure the Jetty server are:

----
include::{JETTY_HOME}/modules/server.mod[tags=documentation-server-config]
include::{jetty-home}/modules/server.mod[tags=documentation-server-config]
----

Among the configurable properties, the most relevant are:
Expand All @@ -83,7 +83,7 @@ The Jetty server strives to keep up with the latest link:https://en.wikipedia.or
The module properties to configure the Jetty server compliance are:

----
include::{JETTY_HOME}/modules/server.mod[tags=documentation-server-compliance]
include::{jetty-home}/modules/server.mod[tags=documentation-server-compliance]
----

Among the configurable properties, the most relevant are:
Expand Down Expand Up @@ -128,5 +128,5 @@ For more information about `CookieCompliance` see also xref:{prog-guide}#pg-serv
The module properties to configure the Jetty server scheduler are:

----
include::{JETTY_HOME}/modules/server.mod[tags=documentation-scheduler-config]
include::{jetty-home}/modules/server.mod[tags=documentation-scheduler-config]
----
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ When the scanning detects a change to the KeyStore file, the correspondent `SslC
The module properties are:

----
include::{JETTY_HOME}/modules/ssl-reload.mod[tags=documentation]
include::{jetty-home}/modules/ssl-reload.mod[tags=documentation]
----
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The `ssl` module provides the secure connector, and allows you to configure the
The module properties to configure the secure connector are:

----
include::{JETTY_HOME}/modules/ssl.mod[tags=documentation-connector]
include::{jetty-home}/modules/ssl.mod[tags=documentation-connector]
----

Among the configurable properties, the most relevant are:
Expand All @@ -41,7 +41,7 @@ Refer to xref:og-module-http-selectors[this section] for more information about
The module properties to configure the KeyStore and TLS parameters are:

----
include::{JETTY_HOME}/modules/ssl.mod[tags=documentation-ssl-context]
include::{jetty-home}/modules/ssl.mod[tags=documentation-ssl-context]
----

[[og-module-ssl-keystore-tls]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The KeyStore file is automatically deleted when the JVM exits, and re-created wh
The module file is `$JETTY_HOME/modules/test-keystore.mod`:

----
include::{JETTY_HOME}/modules/test-keystore.mod[]
include::{jetty-home}/modules/test-keystore.mod[]
----

Note how properties `jetty.sslContext.keyStorePath` and `jetty.sslContext.keyStorePassword` are configured, only if not already set (via the `?=` operator), directly in the module file, rather than in a `+*.ini+` file.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Refer to the xref:og-module-threadpool[`threadpool`] Jetty module for the genera
The module properties to configure the thread pool are:

----
include::{JETTY_HOME}/modules/threadpool-virtual-preview.mod[tags=documentation]
include::{jetty-home}/modules/threadpool-virtual-preview.mod[tags=documentation]
----

The specific properties to configure virtual threads are:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Start with the default value of `maxThreads`, and tune for larger values if need
The module properties to configure the thread pool are:

----
include::{JETTY_HOME}/modules/threadpool.mod[tags=documentation]
include::{jetty-home}/modules/threadpool.mod[tags=documentation]
----

Among the configurable properties, the most relevant are:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ See link:https://www.iana.org/assignments/well-known-uris/well-known-uris.xhtml[
The module properties are:

----
include::{JETTY_HOME}/modules/well-known.mod[tags=documentation]
include::{jetty-home}/modules/well-known.mod[tags=documentation]
----
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
</Call>
</Set>
<Set name="scanInterval" property="jetty.deploy.scanInterval"/>
<Set name="tempDir" property="jetty.deploy.tempDir" />
</New>
</Arg>
</Call>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,5 @@ contextHandlerClass?=org.eclipse.jetty.server.handler.ResourceHandler$ResourceCo
## Monitored directory scan period (seconds)
# jetty.deploy.scanInterval=1

## Base temporary directory for deployed web applications.
# jetty.deploy.tempDir=

## Default ContextHandler class for core deployments
# contextHandlerClass=org.eclipse.jetty.server.handler.ResourceHandler$ResourceContext
Original file line number Diff line number Diff line change
Expand Up @@ -272,46 +272,6 @@ public String[] getConfigurationClasses()
return cc == null ? new String[0] : cc.split(",");
}

/**
* Set the temporary directory for deployment.
* <p>
* This is equivalent to setting the {@link Deployable#BASE_TEMP_DIR} property.
* If not set, then the <code>java.io.tmpdir</code> System Property is used.
*
* @param directory the new work directory
*/
public void setTempDir(String directory)
{
_properties.put(Deployable.BASE_TEMP_DIR, directory);
}

/**
* Set the temporary directory for deployment.
* <p>
* This is equivalent to setting the {@link Deployable#BASE_TEMP_DIR} property.
* If not set, then the <code>java.io.tmpdir</code> System Property is used.
*
* @param directory the new work directory
*/
public void setTempDir(File directory)
{
_properties.put(Deployable.BASE_TEMP_DIR, directory.getAbsolutePath());
}

/**
* Get the temporary directory for deployment.
* <p>
* This is equivalent to getting the {@link Deployable#BASE_TEMP_DIR} property.
*
* @return the user supplied work directory (null if user has not set Temp Directory yet)
*/
@ManagedAttribute("temp directory for use, null if no user set temp directory")
public File getTempDir()
{
String tmpDir = _properties.get(Deployable.BASE_TEMP_DIR);
return tmpDir == null ? null : new File(tmpDir);
}

protected ContextHandler initializeContextHandler(Object context, Path path, Map<String, String> properties)
{
if (LOG.isDebugEnabled())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
</Call>
</Set>
<Set name="scanInterval" property="jetty.deploy.scanInterval"/>
<Set name="tempDir" property="jetty.deploy.tempDir" />
<Call name="loadPropertiesFromString">
<Arg>
<Property name="jetty.deploy.common.properties"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public interface Deployable
};

String ATTRIBUTE_PREFIX = "jetty.deploy.attribute.";
String BASE_TEMP_DIR = "jetty.deploy.tempDir";
String TEMP_DIR = "jetty.deploy.tempDir";
String CONFIGURATION_CLASSES = "jetty.deploy.configurationClasses";
String CONTAINER_SCAN_JARS = "jetty.deploy.containerScanJarPattern";
String CONTEXT_PATH = "jetty.deploy.contextPath";
Expand Down
Loading

0 comments on commit 38d4249

Please sign in to comment.