From 84befe39577b3e5ab40037e89db7876de9231aa8 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Sat, 2 Sep 2023 11:48:27 +0200 Subject: [PATCH] * Fixed substitutions for [source] blocks. * Fixed callouts in XML, using the comment syntax. Signed-off-by: Simone Bordet --- .../contribution-guide/6-documentation.adoc | 2 +- .../operations-guide/annotations/chapter.adoc | 46 +++--- .../operations-guide/begin/deploy.adoc | 12 +- .../operations-guide/begin/start.adoc | 12 +- .../deploy/deploy-extract-war.adoc | 4 +- .../deploy/deploy-hot-static.adoc | 2 +- .../operations-guide/deploy/deploy-jetty.adoc | 8 +- .../operations-guide/deploy/deploy-jndi.adoc | 4 +- .../deploy/deploy-override-webxml.adoc | 4 +- .../deploy/deploy-virtual-hosts.adoc | 8 +- .../operations-guide/jaas/chapter.adoc | 20 +-- .../operations-guide/jaspi/chapter.adoc | 2 +- .../operations-guide/jmx/jmx-remote.adoc | 4 +- .../operations-guide/jndi/chapter.adoc | 28 ++-- .../operations-guide/jsp/chapter.adoc | 10 +- .../keystore/keystore-client-authn.adoc | 4 +- .../keystore/keystore-create.adoc | 2 +- .../keystore/keystore-csr.adoc | 4 +- .../modules/module-server.adoc | 2 +- .../modules/modules-custom.adoc | 9 +- .../protocols/protocols-http.adoc | 4 +- .../protocols/protocols-http2c.adoc | 2 +- .../protocols/protocols-http2s.adoc | 2 +- .../protocols/protocols-http3.adoc | 2 +- .../protocols/protocols-https.adoc | 4 +- .../protocols/protocols-proxy.adoc | 6 +- .../protocols/protocols-ssl.adoc | 4 +- .../server/server-logging-server.adoc | 2 +- .../server/server-threadpool.adoc | 6 +- .../start/start-configure.adoc | 20 +-- .../operations-guide/start/start-stop.adoc | 8 +- .../troubleshooting-debugging.adoc | 4 +- .../troubleshooting/troubleshooting-dump.adoc | 4 +- .../operations-guide/xml/xml-syntax.adoc | 4 +- .../asciidoc/programming-guide/arch-jmx.adoc | 2 +- .../client/http/client-http-intro.adoc | 2 +- .../client/http2/client-http2.adoc | 4 +- .../client/http3/client-http3.adoc | 4 +- .../client/websocket/client-websocket.adoc | 2 +- .../maven/jetty-jspc-maven-plugin.adoc | 154 +++++++++--------- .../maven/jetty-maven-helloworld.adoc | 15 +- .../maven/jetty-maven-plugin.adoc | 51 +++--- .../server/http/server-http-handler-use.adoc | 10 +- .../server/http/server-http-session.adoc | 2 +- .../server/http/server-http.adoc | 2 +- .../server/http2/server-http2.adoc | 2 +- .../server/http3/server-http3.adoc | 2 +- .../websocket/server-websocket-jetty.adoc | 4 +- .../websocket/server-websocket-standard.adoc | 4 +- .../client/http3/HTTP3ClientDocs.java | 95 ----------- 50 files changed, 257 insertions(+), 357 deletions(-) diff --git a/documentation/jetty-documentation/src/main/asciidoc/contribution-guide/6-documentation.adoc b/documentation/jetty-documentation/src/main/asciidoc/contribution-guide/6-documentation.adoc index 6149d73514f..31d51f30ca7 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/contribution-guide/6-documentation.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/contribution-guide/6-documentation.adoc @@ -152,7 +152,7 @@ Consolidating parallel references saves readers from having to sift through repe Instead of referencing multiple versions in your code and command-line examples, it's generally better to target one specific version, typically the latest (currently `{ee-current}`): -[source,subs=attributes] +[source,subs="verbatim,attributes"] ---- $ java -jar $JETTY_HOME/start.jar --add-modules={ee-current}-deploy ---- diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/annotations/chapter.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/annotations/chapter.adoc index e6c0c370b83..4bff87cf506 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/annotations/chapter.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/annotations/chapter.adoc @@ -45,13 +45,13 @@ If it is `metadata-complete=false`, or your web.xml predates the inclusion of th To prevent annotation scanning you can use the `WebAppContext.setConfigurationDiscovered(false)` method. Here's an example context xml file that calls this method: -[source,xml,subs=verbatim] +[source,xml] ---- - <1> - false <2> + + false ---- <1> Configures a link:{javadoc-url}/org/eclipse/jetty/webapp/WebAppContext.html[`WebAppContext`], which is the Jetty component that represents a standard Servlet web application. @@ -73,15 +73,15 @@ The value of this attribute is a regular expression. Here's an example from a context xml file that includes any jar whose name starts with "foo-" or "bar-", or a directory named "classes": -[source,xml,subs=verbatim] +[source,xml] ---- - <1> - <2> - org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern <3> - .*/foo-[^/]*\.jar$|.*/bar-[^/]*\.jar$|.*/classes/.* <4> + + + org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern + .*/foo-[^/]*\.jar$|.*/bar-[^/]*\.jar$|.*/classes/.* ---- @@ -103,15 +103,15 @@ Use the `org.eclipse.jetty.server.webapp.WebInfIncludeJarPattern` context attrib Here's an example of a context xml file that sets a pattern that matches any jar on the webapp's classpath that starts with `spring-`: -[source,xml,subs=verbatim] +[source,xml] ---- - <1> - <2> - org.eclipse.jetty.server.webapp.WebInfIncludeJarPattern <3> - .*/spring-[^/]*\.jar$ <4> + + + org.eclipse.jetty.server.webapp.WebInfIncludeJarPattern + .*/spring-[^/]*\.jar$ ---- @@ -169,15 +169,15 @@ In this case, you can define the `org.eclipse.jetty.containerInitializerExclusio This is a regular expression that defines http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html[patterns] of classnames that you want to exclude. Here's an example of setting the context attribute in a context xml file: -[source,xml,subs=verbatim] +[source,xml] ---- - <1> - <2> - org.eclipse.jetty.containerInitializerExclusionPattern <3> - com.acme.*|com.corp.SlowContainerInitializer <4> + + + org.eclipse.jetty.containerInitializerExclusionPattern + com.acme.*|com.corp.SlowContainerInitializer ---- @@ -200,15 +200,15 @@ It will match all `ServletContainerInitializer` classes not explicitly named in Here is an example context xml file that ensures the `com.example.PrioritySCI` will be called first, followed by the `com.acme.FooSCI`, then all other SCIs: -[source,xml,subs=verbatim] +[source,xml] ---- - <1> - <2> - org.eclipse.jetty.containerInitializerOrder <3> - org.eclipse.jetty.websocket.javax.server.JavaxWebSocketServletContainerInitializer, com.acme.FooSCI, * <4> + + + org.eclipse.jetty.containerInitializerOrder + org.eclipse.jetty.websocket.javax.server.JavaxWebSocketServletContainerInitializer, com.acme.FooSCI, * ---- diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/begin/deploy.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/begin/deploy.adoc index 7682da622ea..6fa22d26d93 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/begin/deploy.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/begin/deploy.adoc @@ -38,7 +38,7 @@ A standard Servlet web application is packaged in either a `+*.war+` file or in ==== Recall that the structure of a `+*.war+` file is as follows: -[source,subs=verbatim] +[source] ---- mywebapp.war ├── index.html <1> @@ -63,12 +63,12 @@ The following examples assume you're deploying a Jakarta {ee-current-caps} appli Refer to the section about xref:og-deploy[deployment] for further information about how to deploy to different environments. ==== -[subs=attributes] +[source,subs="verbatim,attributes"] ---- $ java -jar $JETTY_HOME/start.jar --add-modules={ee-current}-deploy ---- -[source,options=nowrap,subs=attributes] +[source,options=nowrap,subs="verbatim,attributes"] ---- include::jetty[setupArgs="--add-modules=http",args="--add-modules={ee-current}-deploy"] ---- @@ -82,14 +82,14 @@ Refer to the xref:og-protocols[section about protocols] for further information. Now you're ready to copy a web application to the `$JETTY_BASE/webapps` directory. You can use one of the demos shipped with Jetty: -[subs=attributes] +[source,subs="verbatim,attributes"] ---- $ java -jar $JETTY_HOME/start.jar --add-modules={ee-current}-demo-simple ---- The `$JETTY_BASE` directory is now: -[subs=attributes] +[source,subs="verbatim,attributes"] ---- $JETTY_BASE ├── resources @@ -108,7 +108,7 @@ Now start Jetty: $ java -jar $JETTY_HOME/start.jar ---- -[source,subs=quotes,options=nowrap] +[source,options=nowrap,subs="verbatim,attributes,quotes"] ---- include::jetty[setupArgs="--add-modules=http,deploy,{ee-current}-demo-simple",highlight="WebAppContext"] ---- diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/begin/start.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/begin/start.adoc index e12dd21d4d5..cfa5bc9b437 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/begin/start.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/begin/start.adoc @@ -55,7 +55,7 @@ NOTE: If you want to enable support for protocols like secure HTTP/1.1 or HTTP/2 $ java -jar $JETTY_HOME/start.jar --add-modules=http ---- -[source,subs=quotes,options=nowrap] +[source,options=nowrap,subs="verbatim,quotes"] ---- include::jetty[args="--add-modules=http",highlight="([a-z\-]+ *transitively enabled)"] ---- @@ -68,7 +68,7 @@ You can now start Jetty: $ java -jar $JETTY_HOME/start.jar ---- -[source,subs=quotes,options=nowrap] +[source,options=nowrap,subs="verbatim,quotes"] ---- include::jetty[args="--module=http",highlight="(\{.*:8080})"] ---- @@ -78,7 +78,7 @@ But since it has no web applications deployed, it will just reply with `404 Not Before you xref:og-begin-deploy[deploy your first web application], take a moment to see what happened to the `$JETTY_BASE` directory once you enabled the `http` module: -[source,subs=verbatim] +[source] ---- $JETTY_BASE ├── resources @@ -100,7 +100,7 @@ To manually configure such modules, you should activate them directly via Jetty' In the `http.ini` file you can find the following (among other contents): .http.ini -[source,subs=verbatim] +[source] ---- --module=http <1> # jetty.http.port=8080 <2> @@ -126,7 +126,7 @@ If you restart Jetty, it will use this new value: $ java -jar $JETTY_HOME/start.jar ---- -[source,subs=quotes,options=nowrap] +[source,options=nowrap,subs="verbatim,quotes"] ---- include::jetty[args="--module=http jetty.http.port=9999",highlight="(\{.*:9999})"] ---- @@ -138,7 +138,7 @@ A property value specified on the command-line in this way will *override* the v $ java -jar $JETTY_HOME/start.jar jetty.http.port=8080 ---- -[source,subs=quotes,options=nowrap] +[source,options=nowrap,subs="verbatim,quotes"] ---- include::jetty[args="--module=http jetty.http.port=8080",highlight="(\{.*:8080})"] ---- diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/deploy/deploy-extract-war.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/deploy/deploy-extract-war.adoc index e6a39ca8509..a49ecba42ed 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/deploy/deploy-extract-war.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/deploy/deploy-extract-war.adoc @@ -21,7 +21,7 @@ The web application resources are served by Jetty from the files extracted in th If you do not want Jetty to extract the `+*.war+` files, you can disable this feature, for example: .mywebapp.xml -[source,xml,highlight=8,subs="verbatim,attributes"] +[source,xml,subs="verbatim,attributes,quotes"] ---- @@ -29,6 +29,6 @@ If you do not want Jetty to extract the `+*.war+` files, you can disable this fe /mywebapp /opt/webapps/mywebapp.war - false + #false# ---- diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/deploy/deploy-hot-static.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/deploy/deploy-hot-static.adoc index 1d83494f87f..fa2ed9ea053 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/deploy/deploy-hot-static.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/deploy/deploy-hot-static.adoc @@ -30,7 +30,7 @@ $ java -jar $JETTY_HOME/start.jar jetty.deploy.scanInterval=0 To make _static_ deployment persistent, you need to edit the `deploy` module configuration file, `$JETTY_BASE/start.d/deploy.ini`, uncomment the module property `jetty.deploy.scanInterval` and change its value to `0`: .deploy.ini -[source,subs=quotes] +[source,subs="verbatim,quotes"] ---- --module=deploy #jetty.deploy.scanInterval=0# diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/deploy/deploy-jetty.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/deploy/deploy-jetty.adoc index 80a07b2eae5..aacfb9bcf2a 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/deploy/deploy-jetty.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/deploy/deploy-jetty.adoc @@ -28,9 +28,9 @@ A simple Jetty context XML file, for example named `wiki.xml` is the following: - <1> - /wiki <2> - /opt/myapps/myapp.war <3> + + /wiki + /opt/myapps/myapp.war ---- <1> Configures a link:{javadoc-url}/org/eclipse/jetty/{ee-current}/webapp/WebAppContext.html[`WebAppContext`], which is the Jetty component that represents a standard Servlet web application. @@ -40,7 +40,7 @@ A simple Jetty context XML file, for example named `wiki.xml` is the following: The Jetty content XML file may be accompanied by a `+*.properties+` file that specifies the xref:og-deploy[environment] to use for the deployment: .wiki.properties -[source,properties,subs=attributes] +[source,properties,subs="verbatim,attributes"] ---- environment={ee-current} ---- diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/deploy/deploy-jndi.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/deploy/deploy-jndi.adoc index cdaff71923f..bc33774efe1 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/deploy/deploy-jndi.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/deploy/deploy-jndi.adoc @@ -18,7 +18,7 @@ A web application may _reference_ a JNDI entry, such as a JDBC `DataSource` from The JNDI entry must be _defined_ in a xref:og-jndi-xml[Jetty XML file], for example a context XML like so: .mywebapp.xml -[source,xml,subs="verbatim,attributes"] +[source,xml,subs="verbatim,attributes,quotes"] ---- @@ -26,7 +26,7 @@ The JNDI entry must be _defined_ in a xref:og-jndi-xml[Jetty XML file], for exam /mywebapp /opt/webapps/mywebapp.war -#   + # jdbc/myds diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/deploy/deploy-override-webxml.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/deploy/deploy-override-webxml.adoc index ad4c2f299e6..725d39af676 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/deploy/deploy-override-webxml.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/deploy/deploy-override-webxml.adoc @@ -19,7 +19,7 @@ This additional `web.xml` is processed _after_ the `+*.war+` file `web.xml`. This allows you to add host specific configuration or server specific configuration without having to extract the web application `web.xml`, modify it, and repackage it in the `+*.war+` file. .mywebapp.xml -[source,xml,highlight=8,subs="verbatim,attributes"] +[source,xml,subs="verbatim,attributes,quotes"] ---- @@ -27,7 +27,7 @@ This allows you to add host specific configuration or server specific configurat /mywebapp /opt/webapps/mywebapp.war - /opt/webapps/mywebapp-web.xml + #/opt/webapps/mywebapp-web.xml# ---- diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/deploy/deploy-virtual-hosts.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/deploy/deploy-virtual-hosts.adoc index 1e30070bcd4..256f9fc628c 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/deploy/deploy-virtual-hosts.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/deploy/deploy-virtual-hosts.adoc @@ -143,7 +143,7 @@ This configuration may be useful when Jetty sits behind a load balancer. In this case, you want to xref:og-protocols[configure multiple connectors], each with a different name, and then reference the connector name in the web application virtual host configuration: .domain.xml -[source,xml,highlight=10,subs="verbatim,attributes"] +[source,xml,subs="verbatim,attributes,quotes"] ---- @@ -153,14 +153,14 @@ In this case, you want to xref:og-protocols[configure multiple connectors], each /opt/webapps/domain.war - @port8080 + #@port8080# ---- .hobby.xml -[source,xml,highlight=10,subs="verbatim,attributes"] +[source,xml,subs="verbatim,attributes,quotes"] ---- @@ -170,7 +170,7 @@ In this case, you want to xref:og-protocols[configure multiple connectors], each /opt/webapps/hobby.war - @port9090 + #@port9090# diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/jaas/chapter.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/jaas/chapter.adoc index 609ba0cd76d..253510c7349 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/jaas/chapter.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/jaas/chapter.adoc @@ -38,9 +38,9 @@ own custom link:https://docs.oracle.com/javase/7/docs/api/javax/security/auth/sp Enable the `{ee-all}-jaas` module appropriate for your EE platform: -[subs=attributes] +[source] ---- -include::{jetty-home}/modules/{ee-current}-jaas.mod[] +include::{jetty-home}/modules/jaas.mod[] ---- The configurable items in the resulting `$jetty.base/start.d/jaas.ini` file are: @@ -60,7 +60,7 @@ The `` in `web.xml` will be used to identify the `org.eclipse.jetty. For example, this `web.xml` contains a realm called `Test JAAS Realm`: -[source,xml,subs=verbatim] +[source,xml] ---- FORM @@ -76,7 +76,7 @@ For example, this `web.xml` contains a realm called `Test JAAS Realm`: We now need to declare an `org.eclipse.jetty.security.jaas.JAASLoginService` that references the realm name of `Test JAAS Realm`. Here's an example of a suitable XML snippet: -[source,xml,subs=verbatim] +[source,xml] ---- Test JAAS Realm @@ -138,7 +138,7 @@ Refer to the link:https://docs.oracle.com/javase/7/docs/api/javax/security/auth/ Remembering the example we set up xref:og-jaas-webapp[previously], the contents of the `$jetty.base/etc/login.conf` file could look as follows: -[source,subs=verbatim] +[source] ---- xyz { <1> com.acme.SomeLoginModule required debug=true; <2> @@ -172,7 +172,7 @@ You can configure the JDBC connection information, as well as the names of the t Here is an example xref:og-jaas-loginconf[login module configuration file] entry for it using an HSQLDB driver: -[source,subs=verbatim] +[source] ---- jdbc { <1> org.eclipse.jetty.security.jaas.spi.JDBCLoginModule required <2><3> @@ -221,7 +221,7 @@ The `javax.sql.DataSource` is obtained at runtime by performing a JNDI lookup on A sample login module configuration for this `LoginModule`: -[source,subs=verbatim] +[source] ---- ds { <1> org.eclipse.jetty.security.jaas.spi.DataSourceLoginModule required <2><3> @@ -249,7 +249,7 @@ ds { <1> With this login module implementation, the authentication and role information is read from a property file. -[source,subs=verbatim] +[source] ---- props { <1> org.eclipse.jetty.security.jaas.spi.PropertyFileLoginModule required <2><3> @@ -263,7 +263,7 @@ props { <1> The property file must be of the format: -[source,text,subs=verbatim] +[source] ---- : [, ...] ---- @@ -286,7 +286,7 @@ The LDAP connection information and structure of the authentication/authorizatio Here's an example: -[source,subs=verbatim] +[source] ---- example { <1> org.eclipse.jetty.security.jaas.spi.LdapLoginModule required <2><3> diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/jaspi/chapter.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/jaspi/chapter.adoc index 6ba2f2be33f..9c0ac67fe63 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/jaspi/chapter.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/jaspi/chapter.adoc @@ -35,7 +35,7 @@ include::{jetty-home}/modules/{ee-current}-jaspi.mod[] Activate either the `ee9-jaspi` or `{ee-current}-jaspi` module, whichever matches your EE platform version. -[subs=attributes] +[source,subs="verbatim,attributes"] ---- $ java -jar $JETTY_HOME/start.jar --add-modules={ee-current}-jaspi ---- diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/jmx/jmx-remote.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/jmx/jmx-remote.adoc index 33723c82e05..b3fbdb70b42 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/jmx/jmx-remote.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/jmx/jmx-remote.adoc @@ -45,7 +45,7 @@ $ java -jar $JETTY_HOME/start.jar --add-modules=jmx-remote This command creates the `jmx-remote.ini` file: -[source,subs=quotes] +[source,subs="verbatim,quotes"] ---- JETTY_BASE └── start.d @@ -63,7 +63,7 @@ service:jmx:rmi://:/jndi/rmi:// @@ -68,7 +68,7 @@ In such cases, you can use the `org.eclipse.jetty.plus.jndi.EnvEntry` class, and Here's an example that defines the equivalent of an `env-entry` called `mySpecialValue` with value `4000` that overrides an `` declaration of the same name in web.xml: -[source,xml,subs=verbatim] +[source,xml] ---- @@ -118,7 +118,7 @@ Let's examine how to configure some of the most common types of resources. In this example, we'll configure a link:http://db.apache.org/derby[Derby] DataSource named `jdbc/myds`: -[source,xml,subs=verbatim] +[source,xml] ---- @@ -136,7 +136,7 @@ In this example, we'll configure a link:http://db.apache.org/derby[Derby] DataSo This would linked into the webapps JNDI namespace via an entry in a `web.xml` like so: -[source,xml,subs=verbatim] +[source,xml] ---- jdbc/myds @@ -164,7 +164,7 @@ Jetty can bind any implementation of the JMS destinations and connection factori Here is an example of binding an link:http://activemq.apache.org[ActiveMQ] in-JVM connection factory: -[source,xml,subs=verbatim] +[source,xml] ---- @@ -181,7 +181,7 @@ Here is an example of binding an link:http://activemq.apache.org[ActiveMQ] in-JV The corresponding entry in `web.xml` to bind the ConnectionFactory into the webapp's JNDI namespace would be: -[source,xml,subs=verbatim] +[source,xml] ---- jms/connectionFactory @@ -200,7 +200,7 @@ Eg The ConnectionFactory bound in Jetty as `jms/inqueue` would be looked up by t To configure access to `javax.mail.Session` from within a webapp, declare an `org.eclipse.jetty.plus.jndi.Resource` with an `org.eclipse.jetty.jndi.factories.MailSessionReference` that will hold the mail configuration and create the instance of the `Session` when it is referenced: -[source,xml,subs=verbatim] +[source,xml] ---- @@ -249,7 +249,7 @@ Use the link:{javadoc-url}/org/eclipse/jetty/plus/jndi/Transaction.html[org.ecli The following example configures the link:http://www.atomikos.com/[Atomikos] transaction manager: -[source,xml,subs=verbatim] +[source,xml] ---- @@ -275,7 +275,7 @@ You can create a `WEB-INF/jetty-env.xml` file with an `org.eclipse.jetty.plus.jn The context XML file declares `jdbc/workforce`: -[source,xml,subs=verbatim] +[source,xml] ---- @@ -293,7 +293,7 @@ The context XML file declares `jdbc/workforce`: The `web.xml` refers to it as `jdbc/employees`: -[source,xml,subs=verbatim] +[source,xml] ---- jdbc/employees @@ -304,7 +304,7 @@ The `web.xml` refers to it as `jdbc/employees`: Create a `WEB-INF/jetty-env.xml` file with a `org.eclipse.jetty.plus.jndi.Link` to link these names together: -[source,xml,subs=verbatim] +[source,xml] ---- @@ -341,7 +341,7 @@ Naming resources within Jetty belong to one of three different scopes, in increa The name is unique across the JVM instance, and is visible to all application code. This scope is represented by a `null` first parameter to the resource declaration. For example: -[source,xml,subs=verbatim] +[source,xml] ---- @@ -359,7 +359,7 @@ For example: The name is unique to a Server instance, and is only visible to applications associated with that instance. This scope is represented by referencing the Server instance as the first parameter to the resource declaration. For example: -[source,xml,subs=verbatim] +[source,xml] ---- @@ -377,7 +377,7 @@ For example: The name is unique to the `org.eclipse.jetty.ee9.webapp.WebAppContext` instance, and is only visible to that application. This scope is represented by referencing the instance as the first parameter to the resource declaration. For example: -[source,xml,subs=verbatim] +[source,xml] ---- diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/jsp/chapter.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/jsp/chapter.adoc index 1b3e83a7a1a..c2ea863a70b 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/jsp/chapter.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/jsp/chapter.adoc @@ -16,7 +16,7 @@ Jetty supports JSP via the `{ee-all}-jsp` modules, which are based on Apache Jasper: -[subs=attributes] +[source,subs="verbatim,attributes"] ---- include::{jetty-home}/modules/{ee-current}-jsp.mod[] ---- @@ -45,7 +45,7 @@ You can change to a different servlet, change or add ````s or add ex Here's an example of adding an `` to augment the definitions from the standard `webdefault.xml` file: -[source,xml,subs=verbatim] +[source,xml] ---- jsp @@ -62,7 +62,7 @@ Here's an example of adding an `` to augment the definitions from th Another element you might consider adding to the default setup is `async-supported`: -[source,xml,subs=verbatim] +[source,xml] ---- jsp @@ -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-all}-jstl` modules: -[subs=attributes] +[source,subs="verbatim,attributes"] ---- include::{jetty-home}/modules/{ee-current}-jstl.mod[] ---- @@ -194,7 +194,7 @@ You will need to preserve the existing value of the attribute, and add in your e Here's an example of using a context xml file to add in a pattern to match files starting with `jsf-`, which contain the `+*.tld+` files: -[source,xml,subs=verbatim] +[source,xml] ---- diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/keystore/keystore-client-authn.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/keystore/keystore-client-authn.adoc index 76013cbbda7..9c4e90825fc 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/keystore/keystore-client-authn.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/keystore/keystore-client-authn.adoc @@ -24,7 +24,7 @@ The _server authentication certificate_ may be different from the _server domain First, you want to create the private key and server authentication certificate that you will use to sign client certificates: -[source,subs=verbatim] +[source] ---- keytool -genkeypair @@ -72,7 +72,7 @@ keytool At this point, you want to create a client KeyStore, so that you can sign the client certificate with the server authentication cryptographic material: -[source,subs=verbatim] +[source] ---- keytool -genkeypair diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/keystore/keystore-create.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/keystore/keystore-create.adoc index dfd3aed3338..0cd68edd5af 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/keystore/keystore-create.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/keystore/keystore-create.adoc @@ -18,7 +18,7 @@ KeyStores are created with the JDK tool `$JAVA_HOME/bin/keytool`. The following command creates a KeyStore file containing a private key and a self-signed certificate: -[source,subs=verbatim] +[source] ---- keytool -genkeypair <1> diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/keystore/keystore-csr.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/keystore/keystore-csr.adoc index bb31195235e..8183f3a0eeb 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/keystore/keystore-csr.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/keystore/keystore-csr.adoc @@ -20,7 +20,7 @@ Browsers and generic clients (e.g. Java clients) have an internal list of truste To have your self-signed certificate signed by a certificate authority you first need to produce a _certificate signing request_ (CSR): -[source,subs=verbatim] +[source] ---- keytool -certreq <1> @@ -43,7 +43,7 @@ You must import *both* the certificate chain and your signed certificate. First, import the certificate chain: -[source,subs=verbatim] +[source] ---- keytool -importcert <1> diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/modules/module-server.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/modules/module-server.adoc index 4a81ea8c9d9..2d2c0b2acc3 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/modules/module-server.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/modules/module-server.adoc @@ -45,7 +45,7 @@ It is not uncommon for the network packets containing a request header to arrive `jetty.httpConfig.sendServerVersion`:: Whether you want to send the `Server` header in every HTTP response: + -[source,screen,subs=normal] +[source,subs="verbatim,attributes"] ---- HTTP/1.1 200 OK Content-Length: 0 diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/modules/modules-custom.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/modules/modules-custom.adoc index 282429d4ccd..6ca0381d6a8 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/modules/modules-custom.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/modules/modules-custom.adoc @@ -68,7 +68,7 @@ CAUTION: The cipher list used above may not be secure -- it's just an example. Then write your custom module in the `$JETTY_BASE/modules/custom-ssl.mod` file: .custom-ssl.mod -[source,subs=verbatim] +[source] ---- [description] Customizes the standard ssl module. @@ -104,7 +104,7 @@ $ java -jar $JETTY_HOME/start.jar --add-modules=https,custom-ssl The command above will produce the following `$JETTY_BASE` directory structure: -[source,subs=normal] +[source,subs="verbatim,quotes"] ---- $JETTY_BASE ├── etc @@ -156,7 +156,7 @@ Both `+*.jar+` files will be put in the `$JETTY_BASE/lib/` directory. Next, let's write the Jetty XML file that wires the auditing component to the `ServerConnector`, `$JETTY_BASE/etc/acme-audit.xml`: .acme-audit.xml -[source,xml,subs=verbatim,options=nowrap] +[source,xml,options=nowrap] ---- @@ -213,13 +213,14 @@ etc/acme-audit.xml Now you can xref:og-start-configure-enable[enable] the custom auditing module with the following command issued from the `$JETTY_BASE` directory: +[source] ---- $ java -jar $JETTY_HOME/start.jar --add-modules=http,acme-audit ---- The command above will produce the following `$JETTY_BASE` directory structure: -[source,subs=normal] +[source,subs="verbatim,quotes"] ---- $JETTY_BASE ├── etc diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/protocols/protocols-http.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/protocols/protocols-http.adoc index 7a636312d78..1e29ee3dabd 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/protocols/protocols-http.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/protocols/protocols-http.adoc @@ -20,14 +20,14 @@ Clear text HTTP/1.1 is enabled with the `http` Jetty module with the following c $ java -jar $JETTY_HOME/start.jar --add-modules=http ---- -[source,subs=quotes,options=nowrap] +[source,options=nowrap] ---- include::jetty[setupArgs="--add-modules=http"] ---- After having enabled the `http` module, the `$JETTY_BASE` directory looks like this: -[source,subs=quotes] +[source,subs="verbatim,quotes"] ---- JETTY_BASE ├── resources diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/protocols/protocols-http2c.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/protocols/protocols-http2c.adoc index feb8da5c5d0..fc1bd511b7b 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/protocols/protocols-http2c.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/protocols/protocols-http2c.adoc @@ -31,7 +31,7 @@ Starting Jetty yields: $ java -jar $JETTY_HOME/start.jar ---- -[source,subs=quotes,options=nowrap] +[source,options=nowrap,subs="verbatim,quotes"] ---- include::jetty[setupArgs="--add-modules=http,http2c",highlight="(\{.+:8080})"] ---- diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/protocols/protocols-http2s.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/protocols/protocols-http2s.adoc index e9685d07cb5..42fcb549379 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/protocols/protocols-http2s.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/protocols/protocols-http2s.adoc @@ -42,7 +42,7 @@ Starting Jetty yields: $ java -jar $JETTY_HOME/start.jar ---- -[source,subs=quotes,options=nowrap] +[source,options=nowrap,subs="verbatim,quotes"] ---- include::jetty[setupArgs="--add-modules=ssl,http2,https,test-keystore",highlight="(\{.*:8443})"] ---- diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/protocols/protocols-http3.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/protocols/protocols-http3.adoc index 009d36e62fa..3a421629f4b 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/protocols/protocols-http3.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/protocols/protocols-http3.adoc @@ -39,7 +39,7 @@ Starting Jetty yields: $ java -jar $JETTY_HOME/start.jar ---- -[source,subs=quotes,options=nowrap] +[source,options=nowrap,subs="verbatim,quotes"] ---- include::jetty[setupArgs="--approve-all-licenses --add-modules=ssl,http3,test-keystore",highlight="(\{.*:8444})"] ---- diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/protocols/protocols-https.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/protocols/protocols-https.adoc index d9ef7d3e685..0f9e0432982 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/protocols/protocols-https.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/protocols/protocols-https.adoc @@ -59,7 +59,7 @@ include::jetty[setupArgs="--add-modules=ssl,https",args="--add-modules=test-keys The `$JETTY_BASE` directory is now: -[source,subs=quotes] +[source,subs="verbatim,quotes"] ---- ├── etc │ └── #test-keystore.p12# @@ -77,7 +77,7 @@ Starting Jetty yields: $ java -jar $JETTY_HOME/start.jar ---- -[source,subs=quotes,options=nowrap] +[source,options=nowrap,subs="verbatim,quotes"] ---- include::jetty[setupArgs="--add-modules=ssl,https,test-keystore",highlight="(\{.*:8443})"] ---- diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/protocols/protocols-proxy.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/protocols/protocols-proxy.adoc index cd0d286bddf..131423a9de4 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/protocols/protocols-proxy.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/protocols/protocols-proxy.adoc @@ -133,7 +133,7 @@ Starting Jetty yields: $ java -jar $JETTY_HOME/start.jar ---- -[source,subs=quotes,options=nowrap] +[source,options=nowrap,subs="verbatim,quotes"] ---- include::jetty[args="--module=proxy-protocol",highlight="(\{.*:8080})"] ---- @@ -166,7 +166,7 @@ Starting Jetty yields: $ java -jar $JETTY_HOME/start.jar ---- -[source,subs=quotes,options=nowrap] +[source,options=nowrap,subs="verbatim,quotes"] ---- include::jetty[setupArgs="--add-modules=https,test-keystore,proxy-protocol-ssl",highlight="(\{.*:8443})"] ---- @@ -197,7 +197,7 @@ Now you can create the HAProxy configuration file (in Linux it's typically `/etc This is a minimal configuration: .haproxy.cfg -[source,subs=verbatim] +[source] ---- global tune.ssl.default-dh-param 1024 diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/protocols/protocols-ssl.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/protocols/protocols-ssl.adoc index c0987c1175a..38a2ef2cc90 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/protocols/protocols-ssl.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/protocols/protocols-ssl.adoc @@ -43,7 +43,7 @@ For more advanced configuration you may want to configure the TLS protocol versi The correct way of doing this is to create a custom xref:og-xml[Jetty XML file] and reference it in `$JETTY_BASE/start.d/ssl.ini`: .ssl.ini -[source,subs=verbatim] +[source] ---- jetty.sslContext.keyStorePassword=my_passwd! <1> etc/tls-config.xml <2> @@ -56,7 +56,7 @@ The `ssl.ini` file above only shows the lines that are not commented out (you ca You want to create the `$JETTY_BASE/etc/tls-config.xml` with the following template content: .tls-config.xml -[source,xml,subs=verbatim] +[source,xml] ---- diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/server/server-logging-server.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/server/server-logging-server.adoc index c5d63dd8712..f1c5461d7bd 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/server/server-logging-server.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/server/server-logging-server.adoc @@ -43,7 +43,7 @@ When you enable the `logging-jetty` module -- either directly or by transitive d $ java -jar $JETTY_HOME/start.jar --add-modules=http ---- -[source,subs=quotes,options=nowrap] +[source,options=nowrap,subs="verbatim,quotes"] ---- include::jetty[args="--add-modules=http",highlight="(logging-jetty *transitively enabled|copy.*\.properties)"] ---- diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/server/server-threadpool.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/server/server-threadpool.adoc index 216d2a37bfc..65066d7a69f 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/server/server-threadpool.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/server/server-threadpool.adoc @@ -32,7 +32,7 @@ $ java -jar $JETTY_HOME/start.jar --add-modules=threadpool,http After the command above, the `$JETTY_BASE` directory looks like this: -[source,subs=verbatim] +[source] ---- $JETTY_BASE ├── resources @@ -63,7 +63,7 @@ $ java -jar $JETTY_HOME/start.jar --add-modules=threadpool-virtual,http After the command above, the `$JETTY_BASE` directory looks like this: -[source,subs=verbatim] +[source] ---- $JETTY_BASE ├── resources @@ -75,7 +75,7 @@ $JETTY_BASE Now you can customize the `threadpool-virtual.ini` file to explicitly configure the thread pool and the virtual threads and then start Jetty: -[source,subs=quotes,options=nowrap] +[source,options=nowrap] ---- include::jetty[setupArgs="--add-modules=threadpool-virtual,http"] ---- diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/start/start-configure.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/start/start-configure.adoc index f041576a892..35b5c618f93 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/start/start-configure.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/start/start-configure.adoc @@ -79,7 +79,7 @@ $ java -jar $JETTY_HOME/start.jar --add-modules=server,http,logging-jetty The `$JETTY_BASE` directory structure is now: -[source,subs=quotes] +[source,subs="verbatim,quotes"] ---- $JETTY_BASE ├── resources @@ -259,7 +259,7 @@ The `--dry-run` option is quite flexible and below you can find a few examples o To display the `java` executable used to start Jetty: -[source,subs=quotes] +[source,subs="verbatim,quotes"] ---- $ java -jar $JETTY_HOME/start.jar --dry-run=##java## ---- @@ -271,7 +271,7 @@ include::jetty[setupArgs="--add-modules=http",args="--dry-run=java"] To display the JVM options: -[source,subs=quotes] +[source,subs="verbatim,quotes"] ---- $ java -jar $JETTY_HOME/start.jar --dry-run=##opts## ---- @@ -283,7 +283,7 @@ include::jetty[setupModules="src/main/asciidoc/operations-guide/start/jvm.mod",s To display the JVM class-path: -[source,subs=quotes] +[source,subs="verbatim,quotes"] ---- $ java -jar $JETTY_HOME/start.jar --dry-run=##path## ---- @@ -295,7 +295,7 @@ include::jetty[setupModules="src/main/asciidoc/operations-guide/start/postgresql To display the JVM class-path and module-path, if you want to xref:og-start-start-jpms[start Jetty using JPMS] with the `--jpms` option: -[source,subs=quotes] +[source,subs="verbatim,quotes"] ---- $ java -jar $JETTY_HOME/start.jar ##--jpms## --dry-run=##path## ---- @@ -307,7 +307,7 @@ include::jetty[setupModules="src/main/asciidoc/operations-guide/start/postgresql To display the JVM main class: -[source,subs=quotes] +[source,subs="verbatim,quotes"] ---- $ java -jar $JETTY_HOME/start.jar --dry-run=##main## ---- @@ -319,7 +319,7 @@ include::jetty[setupArgs="--add-modules=http",args="--dry-run=main"] To display the JVM main class when xref:og-start-start-jpms[starting Jetty using JPMS]: -[source,subs=quotes] +[source,subs="verbatim,quotes"] ---- $ java -jar $JETTY_HOME/start.jar --jpms --dry-run=##main## ---- @@ -334,7 +334,7 @@ The Jetty XML files compose together the Jetty components that are then configur To display the program arguments passed to the main class: -[source,subs=quotes] +[source,subs="verbatim,quotes"] ---- $ java -jar $JETTY_HOME/start.jar --dry-run=##args## ---- @@ -348,7 +348,7 @@ Note how the program arguments are a list of properties in the form `= /tmp/jvm_cmd_line.txt $ /some/other/java @/tmp/jvm_cmd_line.txt @@ -362,7 +362,7 @@ $ java $(java -jar $JETTY_HOME/start.jar --dry-run=opts,path,main,args) The output of different `--dry-run` executions can be creatively combined in a shell script: -[source,subs=quotes] +[source,subs="verbatim,quotes"] ---- $ OPTS=$(java -jar start.jar --dry-run=##opts,path##) $ MAIN=$(java -jar start.jar --dry-run=##main##) diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/start/start-stop.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/start/start-stop.adoc index cc06b2fb316..8c8fb4b9dc6 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/start/start-stop.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/start/start-stop.adoc @@ -23,7 +23,7 @@ Similarly, from a different terminal, you can exit the Jetty JVM using `kill -IN In the three cases above, the JVM is exited, but by default Jetty components are not stopped. If you want to stop the Jetty components, to stop Jetty more gracefully, you can start Jetty with this property: -[source,subs=quotes] +[source,subs="verbatim,quotes"] ---- $ java -jar $JETTY_HOME/start.jar ##jetty.server.stopAtShutdown=true## ---- @@ -45,12 +45,12 @@ You can start Jetty with the following properties: * `stop.port`, the port number Jetty will listen to for stop commands. Defaults to `-1`, which means that Jetty will not listen to any port. * `stop.key`, the password to verify when a stop command is received. Defaults to a password that is randomly generated and printed when Jetty starts. -[source,subs=quotes] +[source,subs="verbatim,quotes"] ---- $ java -jar $JETTY_HOME/start.jar ##stop.port=8181## ---- -[source,subs=quotes,options=nowrap] +[source,options=nowrap,subs="verbatim,quotes"] ---- include::jetty[setupArgs="--add-modules=http",args="stop.port=8181",highlight="(?i)stop.key"] ---- @@ -61,7 +61,7 @@ CAUTION: You can choose your own `stop.key`, but make sure it's a strong passwor A remote client can now use the Jetty start mechanism to stop the remote Jetty server: -[source,subs=normal] +[source,subs="verbatim,quotes"] ---- $ java -jar $JETTY_HOME/start.jar ##--stop## stop.port=8181 stop.key= ---- diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/troubleshooting/troubleshooting-debugging.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/troubleshooting/troubleshooting-debugging.adoc index b46842a4fa0..dd4084b3985 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/troubleshooting/troubleshooting-debugging.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/troubleshooting/troubleshooting-debugging.adoc @@ -46,7 +46,7 @@ $ java -jar $JETTY_HOME/start.jar --add-modules=server,remote-debug The command above minimally adds a Jetty server without connectors (via the `server` Jetty module) and the `remote-debug` Jetty module, and produces the following `$JETTY_BASE` directory structure: -[source,subs=normal] +[source,subs="verbatim,quotes"] ---- $JETTY_BASE ├── modules @@ -64,7 +64,7 @@ Alternatively, you can enable the `remote-debug` module on the command line, as Starting the Jetty server with the `remote-debug` module enabled yields: -[source,subs=quotes,options=nowrap] +[source,options=nowrap,subs="verbatim,quotes"] ---- include::jetty[setupModules="src/main/asciidoc/operations-guide/troubleshooting/remote-debug.mod",setupArgs="--add-modules=server,remote-debug",highlight="5005"] ---- diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/troubleshooting/troubleshooting-dump.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/troubleshooting/troubleshooting-dump.adoc index 9eb56e7fb05..ffce8f78da2 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/troubleshooting/troubleshooting-dump.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/troubleshooting/troubleshooting-dump.adoc @@ -49,7 +49,7 @@ The `Server.dump()` operation may also be invoked just after the `Server` starts You can temporarily enable the Jetty Server Dump at start time by overriding the `jetty.server.dumpAfterStart` property on the command line: -[source,subs=quotes] +[source,subs="verbatim,quotes"] ---- $ java -jar $JETTY_HOME/start.jar *jetty.server.dumpAfterStart=true* ---- @@ -71,7 +71,7 @@ Detailed thread pool information can also be turned on/off on-the-fly via JMX, b Below you can find a simple example of a Jetty Server Dump, with annotations for the principal components: -[source,subs=verbatim,role=small,options=nowrap] +[source,role=small,options=nowrap] ---- include::jetty[setupArgs="--add-modules=http",args="jetty.http.selectors=1 jetty.http.acceptors=1 jetty.threadPool.minThreads=4 jetty.server.dumpAfterStart=true",delete="^[0-9]{4}",callouts=" <$N>,Server@,= QueuedThreadPool,HandlerList@,= ServerConnector,ManagedSelector@,keys @,startJarLoader@,unmanaged"] ---- diff --git a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/xml/xml-syntax.adoc b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/xml/xml-syntax.adoc index b6efa1195dc..3ef76d0bb16 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/operations-guide/xml/xml-syntax.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/operations-guide/xml/xml-syntax.adoc @@ -193,7 +193,7 @@ The `class` attribute (or `` element) can also be used to specify the Jav This is necessary when the object in scope, onto which the `` would be applied, is an instance of a class that is not visible to Jetty classes, or not accessible because it is not `public`. For example: -[source,xml,subs=normal] +[source,xml,subs="verbatim,quotes"] ---- @@ -378,7 +378,7 @@ The `default` attribute allows you to specify a default value for the property, For example, you may want to configure the context path of your web application in this way: -[source,xml,subs=normal] +[source,xml,subs="verbatim,quotes"] ---- diff --git a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/arch-jmx.adoc b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/arch-jmx.adoc index fb621056b53..68d114113dc 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/arch-jmx.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/arch-jmx.adoc @@ -29,7 +29,7 @@ Similarly, when a component is removed from the tree, `MBeanContainer` is notifi The Maven coordinates for the Jetty JMX support are: -[source,xml,subs=normal] +[source,xml,subs="verbatim,attributes"] ---- org.eclipse.jetty diff --git a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/http/client-http-intro.adoc b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/http/client-http-intro.adoc index fa22d876651..eb9e737f523 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/http/client-http-intro.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/http/client-http-intro.adoc @@ -46,7 +46,7 @@ Out of the box features that you get with the Jetty HTTP client include: The Jetty artifact that provides the main HTTP client implementation is `jetty-client`. The Maven artifact coordinates are the following: -[source,xml,subs=normal] +[source,xml,subs="verbatim,attributes"] ---- org.eclipse.jetty diff --git a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/http2/client-http2.adoc b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/http2/client-http2.adoc index 35b0aae23e1..87a33f5abbb 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/http2/client-http2.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/http2/client-http2.adoc @@ -27,7 +27,7 @@ See also the correspondent xref:pg-server-http2[HTTP/2 server library]. The Maven artifact coordinates for the HTTP/2 client library are the following: -[source,xml,subs=normal] +[source,xml,subs="verbatim,attributes"] ---- org.eclipse.jetty.http2 @@ -109,7 +109,7 @@ In order to send an HTTP request to the server, the client must send a `HEADERS` `HEADERS` frames carry the request method, the request URI and the request headers. Sending the `HEADERS` frame opens the `Stream`: -[source,java,indent=0,subs=normal] +[source,java,indent=0,subs="verbatim,attributes"] ---- include::../../{doc_code}/org/eclipse/jetty/docs/programming/client/http2/HTTP2ClientDocs.java[tags=newStream] ---- diff --git a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/http3/client-http3.adoc b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/http3/client-http3.adoc index 4991063a093..e71a00c1666 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/http3/client-http3.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/http3/client-http3.adoc @@ -27,7 +27,7 @@ See also the correspondent xref:pg-server-http3[HTTP/3 server library]. The Maven artifact coordinates for the HTTP/3 client library are the following: -[source,xml,subs=normal] +[source,xml,subs="verbatim,attributes"] ---- org.eclipse.jetty.http3 @@ -101,7 +101,7 @@ In order to send an HTTP request to the server, the client must send a `HEADERS` `HEADERS` frames carry the request method, the request URI and the request headers. Sending the `HEADERS` frame opens the `Stream`: -[source,java,indent=0,subs=normal] +[source,java,indent=0,subs="verbatim,attributes"] ---- include::../../{doc_code}/org/eclipse/jetty/docs/programming/client/http3/HTTP3ClientDocs.java[tags=newStream] ---- diff --git a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/websocket/client-websocket.adoc b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/websocket/client-websocket.adoc index c14699d422b..3bcf4491abb 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/websocket/client-websocket.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/client/websocket/client-websocket.adoc @@ -23,7 +23,7 @@ Since the first step of establishing a WebSocket communication is an HTTP reques The Maven artifact coordinates are the following: -[source,xml,subs=normal] +[source,xml,subs="verbatim,attributes"] ---- org.eclipse.jetty.websocket diff --git a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/maven/jetty-jspc-maven-plugin.adoc b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/maven/jetty-jspc-maven-plugin.adoc index 384eeb921fe..70d7a69c1e8 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/maven/jetty-jspc-maven-plugin.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/maven/jetty-jspc-maven-plugin.adoc @@ -21,12 +21,12 @@ This plugin will help you pre-compile your JSP and works in conjunction with the Here's the basic setup required to put the jspc plugin into your build: -[source,xml] +[source,xml,subs="verbatim,attributes"] ---- org.eclipse.jetty jetty-jspc-maven-plugin - {VERSION} + {version} jspc @@ -43,32 +43,32 @@ Here's the basic setup required to put the jspc plugin into your build: The configurable parameters are as follows: webXmlFragment:: -Default value: `$\{project.basedir}/target/webfrag.xml` +Default value: `${project.basedir}/target/webfrag.xml` + File into which to generate the servlet declarations. Will be merged with an existing `web.xml`. webAppSourceDirectory:: -Default value: `$\{project.basedir}/src/main/webapp` +Default value: `${project.basedir}/src/main/webapp` + Root of resources directory where jsps, tags etc are located. webXml:: -Default value: `$\{project.basedir}/src/main/webapp/WEB-INF/web.xml` +Default value: `${project.basedir}/src/main/webapp/WEB-INF/web.xml` + The web.xml file to use to merge with the generated fragments. includes:: -Default value: `**\/*.jsp, **\/*.jspx` +Default value: `+**/*.jsp, **/*.jspx+` + The comma separated list of patterns for file extensions to be processed. excludes:: -Default value: `**\/.svn\/**` +Default value: `+**/.svn/**+` + The comma separated list of patterns for file extensions to be skipped. classesDirectory:: -Default value: `$\{project.build.outputDirectory}` +Default value: `${project.build.outputDirectory}` + Location of classes for the webapp. generatedClasses:: -Default value: `$\{project.build.outputDirectory}` +Default value: `${project.build.outputDirectory}` + Location to put the generated classes for the jsps. insertionMarker:: @@ -109,7 +109,7 @@ Introduced in Jetty 9.3.6. Java version of class files generated from jsps. Defaults to 1.7. tldJarNamePatterns:: -Default value: `.*taglibs[^/]*\.jar|.*jstl-impl[^/]*\.jar$` +Default value: `+.*taglibs[^/]*\.jar|.*jstl[^/]*\.jar$+` + Patterns of jars on the 'system' (ie container) path that contain tlds. Use | to separate each pattern. @@ -140,31 +140,31 @@ As compiling jsps is usually done during preparation for a production release an For example, the following profile will only be invoked if the flag `-Dprod` is present on the run line: -[source,xml] +[source,xml,subs="verbatim,attributes"] ---- - - prod - - prod - - - - - org.eclipse.jetty - jetty-jspc-maven-plugin - {VERSION} - - - - org.apache.maven.plugins - maven-war-plugin - - - - - - + + prod + + prod + + + + + org.eclipse.jetty + jetty-jspc-maven-plugin + {version} + + + + org.apache.maven.plugins + maven-war-plugin + + + + + + ---- The following invocation would cause your code to be compiled, the jsps to be compiled, the and s inserted in the `web.xml` and your webapp assembled into a war: @@ -188,33 +188,33 @@ Here's an example configuration of the war plugin that separate those phases int [source,xml] ---- - maven-war-plugin - - - unpack - exploded - generate-resources - - target/foo - - - - org.eclipse.jetty.demos - demo-jetty-webapp - - - - - - pack - war - package - - target/foo - target/web.xml - - - + maven-war-plugin + + + unpack + exploded + generate-resources + + target/foo + + + + org.eclipse.jetty.demos + demo-jetty-webapp + + + + + + pack + war + package + + target/foo + target/web.xml + + + ---- @@ -222,24 +222,24 @@ Now you also need to configure the `jetty-jspc-maven-plugin` so that it can use This is in `target/foo/WEB-INF/web.xml`. Using the default settings, the `web.xml` merged with the jsp servlet definitions will be put into `target/web.xml`. -[source,xml] +[source,xml,subs="verbatim,attributes"] ---- - org.eclipse.jetty - jetty-jspc-maven-plugin - {VERSION} - - - jspc - - jspc - - - target/foo/WEB-INF/web.xml - **/*.foo - **/*.fff - - - + org.eclipse.jetty + jetty-jspc-maven-plugin + {version} + + + jspc + + jspc + + + target/foo/WEB-INF/web.xml + **/*.foo + **/*.fff + + + ---- diff --git a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/maven/jetty-maven-helloworld.adoc b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/maven/jetty-maven-helloworld.adoc index 87988235f44..cb07a7ee2b2 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/maven/jetty-maven-helloworld.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/maven/jetty-maven-helloworld.adoc @@ -94,7 +94,7 @@ public class HelloWorld extends AbstractHandler The `pom.xml` file declares the project name and its dependencies. Use an editor to create the file `pom.xml` in the `JettyMavenHelloWorld` directory with the following contents: -[source,xml] +[source,xml,subs="verbatim,attributes"] ---- Jetty HelloWorld - - {VERSION} + {version} @@ -149,7 +146,7 @@ You can now compile and execute the HelloWorld class by using these commands: > mvn clean compile exec:java ---- -You can point your browser to `http://localhost:8080` to see the _Hello World_ page. +You can point your browser to `+http://localhost:8080+` to see the _Hello World_ page. You can observe what Maven is doing for you behind the scenes by using the `mvn dependency:tree` command, which reveals the transitive dependency resolved and downloaded as: ---- @@ -249,7 +246,7 @@ You need to declare this servlet in the deployment descriptor, so create the fil The `pom.xml` file declares the project name and its dependencies. Use an editor to create the file `pom.xml` with the following contents in the `JettyMavenHelloWarApp` directory, noting particularly the declaration of the xref:jetty-maven-plugin[jetty-maven-plugin]: -[source,xml] +[source,xml,subs="verbatim,attributes"] ---- Jetty HelloWorld WebApp - {VERSION} + {version} @@ -297,7 +294,7 @@ Now you can both build and run the web application without needing to assemble i > mvn jetty:run ---- -You can see the static and dynamic content at `http://localhost:8080/hello` +You can see the static and dynamic content at `+http://localhost:8080/hello+` There are a great deal of configuration options available for the jetty-maven-plugin to help you build and run your webapp. The full reference is at xref:jetty-maven-plugin[Configuring the Jetty Maven Plugin]. diff --git a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/maven/jetty-maven-plugin.adoc b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/maven/jetty-maven-plugin.adoc index c03be7efe74..6a1696546b9 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/maven/jetty-maven-plugin.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/maven/jetty-maven-plugin.adoc @@ -59,12 +59,12 @@ We recommend either the traditional link:{DISTGUIDE}[distribution] deployment ap First, add `jetty-maven-plugin` to your `pom.xml` definition: -[source,xml] +[source,xml,subs="verbatim,attributes"] ---- org.eclipse.jetty jetty-maven-plugin - {VERSION} + {version} ---- @@ -74,7 +74,7 @@ Then, from the same directory as your root `pom.xml`, type: mvn jetty:run ---- -This starts Jetty and serves up your project on http://localhost:8080/. +This starts Jetty and serves up your project on `+http://localhost:8080/+`. Jetty will continue to run until you stop it. By default, it will not automatically restart your webapp. @@ -112,7 +112,7 @@ mvn jetty:help To see the detailed list of parameters that can be configured for a particular goal, in addition to its description, do: ---- -mvn jetty:help -Ddetail=true -Dgoal= +mvn jetty:help -Ddetail=true -Dgoal= ---- [[deployment-modes]] @@ -320,12 +320,12 @@ Output from jetty will be logged to the console. Here is an example, which turns on scanning for changes every ten seconds, and sets the webapp context path to `/test`: -[source,xml] +[source,xml,subs="verbatim,attributes"] ---- org.eclipse.jetty jetty-maven-plugin - {VERSION} + {version} 10 @@ -412,18 +412,18 @@ Patterns are specified as a relative path using a glob-like syntax as described See xref:deployment-modes[Deployment Modes] for other configuration parameters available when using the `run` goal in EMBED, FORK or EXTERNAL modes. -Here's an example of a pom configuration for the plugin with the `run` goal: +Here is an example of a pom configuration for the plugin with the `run` goal: -[source,xml] +[source,xml,subs="verbatim,attributes"] ---- -... + ... -... + ... org.eclipse.jetty jetty-maven-plugin - {VERSION} + {version} / @@ -453,7 +453,7 @@ Here's an example of a pom configuration for the plugin with the `run` goal: -... + ... ---- @@ -529,12 +529,12 @@ Prior to jetty-9.4.7 any dependencies needed to be built first. Here's an example of using the `pre-integration-test` and `post-integration-test` Maven build phases to trigger the execution and termination of Jetty: -[source,xml] +[source,xml,subs="verbatim,attributes"] ---- org.eclipse.jetty jetty-maven-plugin - {VERSION} + {version} foo 9999 @@ -721,12 +721,12 @@ If false or not specified, the plugin does not wait for confirmation but exits a Here's a configuration example: -[source,xml] +[source,xml,subs="verbatim,attributes"] ---- org.eclipse.jetty jetty-maven-plugin - {VERSION} + {version} 9966 foo @@ -859,12 +859,12 @@ WebAppY: They are configured for the http://maven.apache.org/plugins/maven-war-plugin/overlays.html[maven-war-plugin]: -[source,xml] +[source,xml,subs="verbatim,attributes"] ---- org.apache.maven.plugins maven-war-plugin - {VERSION} + {version} @@ -950,12 +950,12 @@ Then our webapp has available these additional resources: You can configure LoginServices in the plugin. Here's an example of setting up the HashLoginService for a webapp: -[source,xml] +[source,xml,subs="verbatim,attributes"] ---- org.eclipse.jetty jetty-maven-plugin - {VERSION} + {version} 10 @@ -969,7 +969,6 @@ Here's an example of setting up the HashLoginService for a webapp: - ---- [[using-multiple-webapp-root-directories]] @@ -1005,12 +1004,12 @@ If you want to deploy webapp A, and webapps B and C in the same Jetty instance: Putting the configuration in webapp A's `pom.xml`: -[source,xml] +[source,xml,subs="verbatim,attributes"] ---- org.eclipse.jetty jetty-maven-plugin - {VERSION} + {version} 10 @@ -1063,12 +1062,12 @@ Copy the `jetty.xml` file from the Jetty distribution, and then add WebAppContex Then configure the location of this `jetty.xml` file into webapp A's jetty plugin: -[source,xml] +[source,xml,subs="verbatim,attributes"] ---- org.eclipse.jetty jetty-maven-plugin - {VERSION} + {version} 10 @@ -1096,7 +1095,6 @@ In the latter case, you can use the link:http://www.mojohaus.org/[maven properti org.codehaus.mojo properties-maven-plugin - 1.0-alpha-2 @@ -1140,7 +1138,6 @@ Here's an example of how to specify System properties in the POM: - ---- [[specifying-properties-in-file]] diff --git a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/http/server-http-handler-use.adoc b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/http/server-http-handler-use.adoc index b5f4e839d97..e039ecbdb4a 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/http/server-http-handler-use.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/http/server-http-handler-use.adoc @@ -190,7 +190,7 @@ Server The Maven artifact coordinates are: -[source,xml,subs=normal] +[source,xml,subs="verbatim,attributes"] ---- org.eclipse.jetty @@ -404,7 +404,7 @@ With `ServletContextHandler` you can just put all your Servlet components in a ` The Maven artifact coordinates depend on the version of Jakarta EE you want to use, and they are: -[source,xml,subs=normal] +[source,xml,subs="verbatim,attributes"] ---- org.eclipse.jetty.{ee-all} @@ -428,7 +428,7 @@ include::../../{doc_code}/org/eclipse/jetty/docs/programming/server/http/HTTPSer The `Handler` and Servlet components tree structure looks like the following: -[source,screen,subs=normal] +[source,screen,subs="verbatim,quotes"] ---- Server └── ServletContextHandler /shop @@ -455,7 +455,7 @@ Server applications must be careful when creating the `Handler` tree to put ``Se The Maven artifact coordinates depend on the version of Jakarta EE you want to use, and they are: -[source,xml,subs=normal] +[source,xml,subs="verbatim,attributes"] ---- org.eclipse.jetty.{ee-all} @@ -510,7 +510,7 @@ The features are similar, but `DefaultServlet` is more commonly used to serve st The Maven artifact coordinates depend on the version of Jakarta EE you want to use, and they are: -[source,xml,subs=normal] +[source,xml,subs="verbatim,attributes"] ---- org.eclipse.jetty.{ee-all} diff --git a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/http/server-http-session.adoc b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/http/server-http-session.adoc index e11545cd426..678c089e804 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/http/server-http-session.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/http/server-http-session.adoc @@ -25,7 +25,7 @@ Since not all web applications need support for the HTTP session, Jetty offers t The Maven coordinates for the Jetty HTTP session support are: -[source,xml] +[source,xml,subs="verbatim,attributes"] ---- org.eclipse.jetty diff --git a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/http/server-http.adoc b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/http/server-http.adoc index 0ba5e72a74b..8d8c1f3c35c 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/http/server-http.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/http/server-http.adoc @@ -22,7 +22,7 @@ This result in your web applications to be available to HTTP clients as if you d The Maven artifact coordinates are: -[source,xml,subs=normal] +[source,xml,subs="verbatim,attributes"] ---- org.eclipse.jetty diff --git a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/http2/server-http2.adoc b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/http2/server-http2.adoc index 65f9364d8d4..dfd59962a90 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/http2/server-http2.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/http2/server-http2.adoc @@ -25,7 +25,7 @@ See also the correspondent xref:pg-client-http2[HTTP/2 client library]. The Maven artifact coordinates for the HTTP/2 client library are the following: -[source,xml,subs=normal] +[source,xml,subs="verbatim,attributes"] ---- org.eclipse.jetty.http2 diff --git a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/http3/server-http3.adoc b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/http3/server-http3.adoc index 9246c21d56c..2307d76caba 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/http3/server-http3.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/http3/server-http3.adoc @@ -25,7 +25,7 @@ See also the correspondent xref:pg-client-http3[HTTP/3 client library]. The Maven artifact coordinates for the HTTP/3 client library are the following: -[source,xml,subs=normal] +[source,xml,subs="verbatim,attributes"] ---- org.eclipse.jetty.http3 diff --git a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/websocket/server-websocket-jetty.adoc b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/websocket/server-websocket-jetty.adoc index 213cff15830..9bfa45bb85f 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/websocket/server-websocket-jetty.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/websocket/server-websocket-jetty.adoc @@ -19,7 +19,7 @@ However, at runtime you need to have the _implementation_ of the Jetty WebSocket Jetty's WebSocket APIs are provided by the following Maven artifact: -[source,xml,subs=normal] +[source,xml,subs="verbatim,attributes"] ---- org.eclipse.jetty.websocket @@ -30,7 +30,7 @@ Jetty's WebSocket APIs are provided by the following Maven artifact: Jetty's implementation of the Jetty WebSocket APIs is provided by the following Maven artifact (and its transitive dependencies): -[source,xml,subs=normal] +[source,xml,subs="verbatim,attributes"] ---- org.eclipse.jetty.websocket diff --git a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/websocket/server-websocket-standard.adoc b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/websocket/server-websocket-standard.adoc index 9191f685f12..f3cf9a4ebd9 100644 --- a/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/websocket/server-websocket-standard.adoc +++ b/documentation/jetty-documentation/src/main/asciidoc/programming-guide/server/websocket/server-websocket-standard.adoc @@ -19,7 +19,7 @@ However, at runtime you need to have an implementation of the standard APIs in y The standard `jakarta.websocket` APIs, for example for Jakarta {ee-current-caps}, are provided by the following Maven artifact: -[source,xml,subs=normal] +[source,xml] ---- jakarta.websocket @@ -30,7 +30,7 @@ The standard `jakarta.websocket` APIs, for example for Jakarta {ee-current-caps} At runtime, you also need an implementation of the standard Jakarta {ee-current-caps} WebSocket APIs, that Jetty provides with the following Maven artifact (and its transitive dependencies): -[source,xml,subs=normal] +[source,xml,subs="verbatim,attributes"] ---- org.eclipse.jetty.{ee-current}.websocket diff --git a/documentation/jetty-documentation/src/main/java/org/eclipse/jetty/docs/programming/client/http3/HTTP3ClientDocs.java b/documentation/jetty-documentation/src/main/java/org/eclipse/jetty/docs/programming/client/http3/HTTP3ClientDocs.java index 108093bcc01..309f645fe8d 100644 --- a/documentation/jetty-documentation/src/main/java/org/eclipse/jetty/docs/programming/client/http3/HTTP3ClientDocs.java +++ b/documentation/jetty-documentation/src/main/java/org/eclipse/jetty/docs/programming/client/http3/HTTP3ClientDocs.java @@ -258,99 +258,4 @@ public class HTTP3ClientDocs stream.reset(HTTP3ErrorCode.REQUEST_CANCELLED_ERROR.code(), new ClosedChannelException()); // end::reset[] } - - // TODO: push not yet implemented in HTTP/3 -/* - public void push() throws Exception - { - HTTP3Client http3Client = new HTTP3Client(); - http3Client.start(); - SocketAddress serverAddress = new InetSocketAddress("localhost", 8444); - CompletableFuture sessionCF = http3Client.connect(serverAddress, new Session.Listener()); - Session session = sessionCF.get(); - - HttpFields requestHeaders = HttpFields.build() - .put(HttpHeader.USER_AGENT, "Jetty HTTP3Client {version}"); - MetaData.Request request = new MetaData.Request("GET", HttpURI.from("http://localhost:8080/path"), HttpVersion.HTTP_2, requestHeaders); - HeadersFrame headersFrame = new HeadersFrame(request, null, true); - - // tag::push[] - // Open a Stream by sending the HEADERS frame. - CompletableFuture streamCF = session.newStream(headersFrame, new Stream.Listener() - { - @Override - public Stream.Listener onPush(Stream pushedStream, PushPromiseFrame frame) - { - // The "request" the client would make for the pushed resource. - MetaData.Request pushedRequest = frame.getMetaData(); - // The pushed "request" URI. - HttpURI pushedURI = pushedRequest.getURI(); - // The pushed "request" headers. - HttpFields pushedRequestHeaders = pushedRequest.getFields(); - - // If needed, retrieve the primary stream that triggered the push. - Stream primaryStream = pushedStream.getSession().getStream(frame.getStreamId()); - - // Return a Stream.Listener to listen for the pushed "response" events. - return new Adapter() - { - @Override - public void onHeaders(Stream stream, HeadersFrame frame) - { - // Handle the pushed stream "response". - - MetaData metaData = frame.getMetaData(); - if (metaData.isResponse()) - { - // The pushed "response" headers. - HttpFields pushedResponseHeaders = metaData.getFields(); - } - } - - @Override - public void onData(Stream stream, DataFrame frame, Callback callback) - { - // Handle the pushed stream "response" content. - - // The pushed stream "response" content bytes. - ByteBuffer buffer = frame.getData(); - // Consume the buffer and complete the callback. - callback.succeeded(); - } - }; - } - }); - // end::push[] - } - - public void pushReset() throws Exception - { - HTTP3Client http3Client = new HTTP3Client(); - http3Client.start(); - SocketAddress serverAddress = new InetSocketAddress("localhost", 8444); - CompletableFuture sessionCF = http3Client.connect(serverAddress, new Session.Listener()); - Session session = sessionCF.get(); - - HttpFields requestHeaders = HttpFields.build() - .put(HttpHeader.USER_AGENT, "Jetty HTTP3Client {version}"); - MetaData.Request request = new MetaData.Request("GET", HttpURI.from("http://localhost:8080/path"), HttpVersion.HTTP_2, requestHeaders); - HeadersFrame headersFrame = new HeadersFrame(request, null, true); - - // tag::pushReset[] - // Open a Stream by sending the HEADERS frame. - CompletableFuture streamCF = session.newStream(headersFrame, new Stream.Listener() - { - @Override - public Stream.Listener onPush(Stream pushedStream, PushPromiseFrame frame) - { - // Reset the pushed stream to tell the server we are not interested. - pushedStream.reset(new ResetFrame(pushedStream.getId(), ErrorCode.CANCEL_STREAM_ERROR.code), Callback.NOOP); - - // Not interested in listening to pushed response events. - return null; - } - }); - // end::pushReset[] - } - */ }