Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #5771 - updates to SE WebServer toc #5772

Merged
merged 3 commits into from
Jan 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions docs/se/webserver.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////////

Copyright (c) 2018, 2022 Oracle and/or its affiliates.
Copyright (c) 2018, 2023 Oracle and/or its affiliates.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -26,10 +26,21 @@ include::{rootdir}/includes/se.adoc[]

== Contents

- <<Overview, Overview>>
- <<Overview,Overview>>
- <<Maven Coordinates, Maven Coordinates>>
- <<Usage, Usage>>
- <<Configuration, Configuration>>
** <<Configuring the WebServer in Your Code, Configuring the WebServer in Your Code>>
** <<Configuring the WebServer in a Configuration File, Configuring the WebServer in a Configuration File>>
** <<Configuration Options, Configuration Options>>
*** <<Routing, Routing>>
*** <<Request Handling, Request Handling>>
*** <<Error Handling, Error Handling>>
- <<Supported Technologies, Supported Technologies>>
** <<HTTP/2 Support, HTTP/2 Support>>
** <<Static Content Support, Static Content Support>>
** <<Jersey (JAX-RS) Support, Jersey (JAX-RS) Support>>
** <<JSON Support, JSON Support>>
- <<Reference, Reference>>
- <<Additional Information, Additional Information>>

Expand Down Expand Up @@ -69,7 +80,7 @@ WebServer webServer = WebServer.builder()
.build();
----

=== Configuring the WebServer in a configuration file
=== Configuring the WebServer in a Configuration File

You can also define the configuration in a file.

Expand Down Expand Up @@ -98,7 +109,7 @@ just use `Config.create()`

include::{rootdir}/config/io_helidon_webserver_WebServer.adoc[leveloffset=+2,tag=config]

== Routing [[routing]]
== Routing
Routing lets you use request matching criteria to bind requests to a `handler` that implements
your custom business logic. Matching criteria include one or more *HTTP Method(s)* and, optionally,
a request *path matcher*. Use the `RequestPredicate` class to specify more routing
Expand Down Expand Up @@ -293,7 +304,7 @@ To complete the request handling, you must send a response by calling the `res.s
<1> handler that terminates the request handling for any HTTP method using the `/hello` path
<2> send the response

== Protocol Specific Routing
=== Protocol Specific Routing
Handling routes based on the protocol version is possible by registering specific routes
on routing builder.

Expand Down Expand Up @@ -372,7 +383,7 @@ are equivalent.
<1> Call a downstream error handler with the `Throwable` instance.
<2> Here, `req.next()` is the same as `req.next(ex)`. In both cases, the downstream error handler is called.

=== Default error handling
=== Default Error Handling
If no user-defined error handler is matched, or if the last error handler of the
exception called `req.next()`, then the exception is translated to an HTTP response as follows:

Expand All @@ -387,14 +398,15 @@ exception called `req.next()`, then the exception is translated to an HTTP respo
* Otherwise, the exceptions are translated to an Internal Server Error HTTP
error code `500`.

== Supported Technologies
== HTTP/2 Support

Helidon supports HTTP/2 upgrade from HTTP/1, HTTP/2 without prior knowledge
and HTTP/2 with ALPN over TLS.
HTTP/2 support is enabled in webserver by default when it's artifact is available on classpath.

=== Maven Coordinates
To enable Http/2 support add the following dependency to your project's `pom.xml`.
To enable HTTP/2 support add the following dependency to your project's `pom.xml`.

[source,xml]
----
Expand Down