You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For Spring Boot, all those properties are configurable in `application.properties` or `application.yaml` as is. For example:
57
57
58
-
[source,java]
58
+
[source,properties]
59
59
.application.properties
60
60
----
61
61
hawtio.disableProxy = true
62
62
----
63
63
64
64
== Configuring Jolokia through System properties
65
65
66
-
The Jolokia agent is deployed automatically with `io.hawt.web.JolokiaConfiguredAgentServlet` that extends Jolokia native `org.jolokia.http.AgentServlet` class, defined in `hawtio-war/WEB-INF/web.xml`.
66
+
The Jolokia agent is deployed automatically with `io.hawt.web.JolokiaConfiguredAgentServlet` that extends Jolokia native `org.jolokia.server.core.http.AgentServlet` class, defined in `hawtio-war/WEB-INF/web.xml`.
67
67
68
68
If you want to customize the Jolokia Servlet with the configuration parameters that are defined in the https://jolokia.org/reference/html/manual/agents.html#agent-war-init-params[Jolokia documentation], you can pass them as System properties prefixed with `jolokia.`. For example:
@@ -83,11 +83,12 @@ WARNING: You cannot use Hawtio RBAC with Quarkus and Spring Boot yet. Enabling t
83
83
84
84
To activate the Hawtio RBAC restrictor, configure the Jolokia parameter `restrictorClass` via System property to use `io.hawt.web.RBACRestrictor` as follows:
`hawtconfig.json` is the entrypoint JSON file for configuring the frontend console of Hawtio. It can be used to customise the various parts of the console: the branding, styles and basic UI parts such as the login page and about modal, as well as the console-specific behaviours of some of the Hawtio plugins.
https://github.com/hawtio/hawtio/releases/latest[Download hawtio-default.war from GitHub,window=_blank]
217
217
218
218
Please read xref:configuration.adoc[] to see how to configure the console, or in particular for security see xref:security.adoc[].
219
219
220
+
=== Deploying to Apache Tomcat
221
+
222
+
Standard https://tomcat.apache.org/[Apache Tomcat] distribution is ready to use unpacking and Hawtio WAR application can simply be copied into `$TOMCAT_HOME/webapps`.
223
+
224
+
=== Deploying to Eclipse Jetty
225
+
226
+
Jetty distribution is https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-home/[available in Maven Central] as `org.eclipse.jetty:jetty-home` Maven artifacts.
227
+
228
+
With Jetty 12, it is not possible to simply start the server after unzipping `jetty-home.zip` archive. The recommended way is to create a _Jetty Base_ directory and start from there after adding necessary _modules_. See https://jetty.org/docs/jetty/12/operations-guide/begin/index.html#quick-setup[Jetty Quick Setup] for details.
229
+
230
+
After setting up _base_ location, it is enough to simply add `http` and `ee10-deploy` (Jetty 12) or `deploy` (Jetty 11) module - all required modules will be used automatically.
231
+
232
+
However we recommend to explicitly add the modules on which `ee10-deploy` (or `deploy`) module depends - all template configuration files will then be available in `$JETTY_BASE/start.d/` directory.
233
+
234
+
Because Hawtio can be configured using System properties, we can make configuration easier by adding Jetty's `jvm` module, so all configuration properties can be stored in `$JETTY_BASE/start.d/jvm.ini`.
235
+
236
+
==== Jetty XML deployment
237
+
238
+
It is possible to https://jetty.org/docs/jetty/12/operations-guide/deploy/index.html#context-xml[deploy Jetty XML file instead of actual WAR application], so when there's `hawtio.war` located in your local filesystem, it is possible to drop this file int o `$JETTY_BASE/webapps`:
239
+
240
+
[source,xml]
241
+
----
242
+
<?xml version="1.0" encoding="UTF-8"?>
243
+
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://jetty.org/configure_10_0.dtd">
But there's a trick here. Normally Jetty unpacks this WAR archive to a temporary folder (which may be specified with `-Djava.io.tmpdir` system property). But there's no need for unpacking if there's `hawtio-war-4.2.0` _directory_ next to `hawtio-war-4.2.0.war` achive.
251
+
252
+
Jetty uses `org.eclipse.jetty.server.SymlinkAllowedResourceAliasChecker` _alias checker_ and if
253
+
_real path_ for the above `/data/tmp/hawtio-war-4.2.0` is different (i.e., the path uses symbolic links), resources from this WAR application won't be loaded and Hawtio application won't work.
254
+
255
+
NOTE:: This may be a problem when using such XML deployment when `hawtio.war` is located in Maven project, because `maven-war-plugin` usually keeps `hawtio-war-<version>` directory and `hawtio-war-<version>.war` archive in the same `target/` location.
256
+
220
257
== Using Hawtio embedded in a Java application
221
258
222
259
You can also embed Hawtio inside your Java application instead of deploying it on a servlet container or application server.
0 commit comments