This is an automated email from the ASF dual-hosted git repository.

bamaer pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/hop.git


The following commit(s) were added to refs/heads/main by this push:
     new 03e50929fa Publish a Hop Web war that runs on a plain Tomcat, fixes 
#9564 (#9579)
03e50929fa is described below

commit 03e50929fa11c029aacc9fd037b32eecf110ca39
Author: Hans Van Akelyen <[email protected]>
AuthorDate: Thu Nov 19 11:09:18 2026 +0100

    Publish a Hop Web war that runs on a plain Tomcat, fixes #9564 (#9579)
    
    * Publish a Hop Web war that runs on a plain Tomcat, fixes #9564
    
    * fix remarks
---
 Jenkinsfile                                        |   3 +-
 Jenkinsfile.hop-web-selenium                       |   7 +-
 assemblies/client/pom.xml                          |  31 +--
 assemblies/pom.xml                                 |  45 +++-
 assemblies/web-war/pom.xml                         | 233 +++++++++++++++++++++
 assemblies/web-war/src/assembly/plugins.xml        |  44 ++++
 assemblies/web-war/src/assembly/war.xml            |  46 ++++
 docker/create_hop_web_container.sh                 |  25 +--
 docker/run-hop-web-local-with-basic.sh             |  20 +-
 docker/run-hop-web-local-with-oauth.sh             |  20 +-
 docker/run-hop-web-local-with-users.sh             |  20 +-
 docker/run-hop-web-local.sh                        |  24 +--
 docker/unified.Dockerfile                          |  57 +++--
 docker/web.Dockerfile                              |  41 ++--
 .../pages/apache-release/creating-a-release.adoc   |  26 ++-
 .../pages/apache-release/promoting-a-release.adoc  |   2 +-
 .../modules/ROOT/pages/hopweb/index.adoc           | 165 ++-------------
 .../modules/ROOT/pages/hop-gui/hop-web.adoc        |  88 +++++++-
 .../org/apache/hop/ui/hopgui/HopWebDefaults.java   |  97 +++++++++
 .../ui/hopgui/HopWebServletContextListener.java    |   5 +
 .../apache/hop/ui/hopgui/HopWebDefaultsTest.java   | 137 ++++++++++++
 tools/check-assembly-size.sh                       |   3 +
 22 files changed, 818 insertions(+), 321 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 406bc89497..b4755206f1 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -130,7 +130,8 @@ pipeline {
                 sh "unzip ./assemblies/client/target/hop-client-*.zip -d 
./assemblies/client/target/"
                 // Optional Wave 1 plugins are marketplace-only; install into 
the extracted client for IT/Docker
                 sh "./tools/install-wave1-plugins.sh 
./assemblies/client/target/hop"
-                sh "unzip ./assemblies/web/target/hop.war -d 
./assemblies/web/target/webapp"
+                // And for the Hop Web image, which takes the rest from 
assemblies/web-war/target
+                sh "./tools/install-wave1-plugins.sh 
./assemblies/web-war/target/optional"
             }
         }
         stage('Generate Hop fat jar'){
diff --git a/Jenkinsfile.hop-web-selenium b/Jenkinsfile.hop-web-selenium
index c5aba8f804..2567dd97d5 100644
--- a/Jenkinsfile.hop-web-selenium
+++ b/Jenkinsfile.hop-web-selenium
@@ -102,10 +102,9 @@ pipeline {
                 // fast-build: no tests, rat, spotless, checkstyle or javadoc 
- the main build covers
                 // those. Only the assemblies the Web image is made of are 
needed here.
                 sh "mvn $MAVEN_PARAMS -Pfast-build clean install"
-                sh "unzip -qo ./assemblies/client/target/hop-client-*.zip -d 
./assemblies/client/target/"
-                // Same as the main job: the marketplace-only plugins go into 
the image too
-                sh "./tools/install-wave1-plugins.sh 
./assemblies/client/target/hop"
-                sh "unzip -qo ./assemblies/web/target/hop.war -d 
./assemblies/web/target/webapp"
+                // Same as the main job: the marketplace-only plugins go into 
the image too.
+                // The rest of the image comes from assemblies/web-war/target 
as built.
+                sh "./tools/install-wave1-plugins.sh 
./assemblies/web-war/target/optional"
             }
         }
         stage('Build Hop Web image') {
diff --git a/assemblies/client/pom.xml b/assemblies/client/pom.xml
index 87f7153f60..7cea061573 100644
--- a/assemblies/client/pom.xml
+++ b/assemblies/client/pom.xml
@@ -32,7 +32,7 @@
         <!-- hop-client-<version>.zip is published to Maven Central next to 
the copy on
              dist.apache.org, so it can be resolved as a normal artifact. The 
other assemblies
              (web, plugins, static, debug) stay unpublished through the 
parent's
-             maven.deploy.skip. The deployed POM is flattened, see 
flatten-maven-plugin below. -->
+             maven.deploy.skip. -->
         <maven.deploy.skip>false</maven.deploy.skip>
         
<org.eclipse.swt.cocoa.macosx.aarch64.version>${org.eclipse.platform.version}</org.eclipse.swt.cocoa.macosx.aarch64.version>
         
<org.eclipse.swt.cocoa.macosx.x86_64.version>${org.eclipse.platform.version}</org.eclipse.swt.cocoa.macosx.x86_64.version>
@@ -168,37 +168,10 @@
 
     <build>
         <plugins>
-            <!-- The dependencies above are build inputs for the assembly 
descriptor, not a
-                 classpath for consumers: several are never published 
(hop-assemblies-*) and the
-                 parent hop-assemblies POM is not deployed either. Publish a 
POM without parent,
-                 dependencies, profiles or build so hop-client:zip resolves on 
its own. -->
+            <!-- Deploy a POM without parent or dependencies; see the 
assemblies parent. -->
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>flatten-maven-plugin</artifactId>
-                <version>${flatten-maven-plugin.version}</version>
-                <configuration>
-                    <flattenMode>ossrh</flattenMode>
-                    
<outputDirectory>${project.build.directory}</outputDirectory>
-                    <!-- Flatten skips pom packaging unless told otherwise. -->
-                    <updatePomFile>true</updatePomFile>
-                    <pomElements>
-                        <dependencies>remove</dependencies>
-                        <dependencyManagement>remove</dependencyManagement>
-                        <profiles>remove</profiles>
-                        <build>remove</build>
-                        <repositories>remove</repositories>
-                        <pluginRepositories>remove</pluginRepositories>
-                    </pomElements>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>flatten</id>
-                        <goals>
-                            <goal>flatten</goal>
-                        </goals>
-                        <phase>process-resources</phase>
-                    </execution>
-                </executions>
             </plugin>
         </plugins>
     </build>
diff --git a/assemblies/pom.xml b/assemblies/pom.xml
index 8ff3994788..6cabb59159 100644
--- a/assemblies/pom.xml
+++ b/assemblies/pom.xml
@@ -36,12 +36,53 @@
         <module>plugins</module>
         <module>static</module>
         <module>web</module>
+        <module>web-war</module>
     </modules>
 
     <properties>
         <assembly.dir>${project.build.directory}/assembly</assembly.dir>
-        <!-- Nothing under assemblies/ is deployed except hop-client, which 
sets this back to
-             false and deploys a flattened POM that does not reference this 
parent. -->
+        <!-- Nothing under assemblies/ is deployed except hop-client and 
hop-web, which set this
+             back to false and deploy a flattened POM that does not reference 
this parent. -->
         <maven.deploy.skip>true</maven.deploy.skip>
     </properties>
+
+    <build>
+        <pluginManagement>
+            <plugins>
+                <!-- For the assemblies that are deployed (hop-client, 
hop-web). Their dependencies
+                     are build inputs for the assembly descriptors, not a 
classpath for consumers:
+                     several are never published, and neither is this parent 
POM. Deploy a POM
+                     without parent, dependencies, profiles or build so the 
zip or war resolves
+                     on its own. A module opts in by declaring the plugin. -->
+                <plugin>
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>flatten-maven-plugin</artifactId>
+                    <version>${flatten-maven-plugin.version}</version>
+                    <configuration>
+                        <flattenMode>ossrh</flattenMode>
+                        
<outputDirectory>${project.build.directory}</outputDirectory>
+                        <!-- Flatten skips pom packaging unless told 
otherwise. -->
+                        <updatePomFile>true</updatePomFile>
+                        <pomElements>
+                            <dependencies>remove</dependencies>
+                            <dependencyManagement>remove</dependencyManagement>
+                            <profiles>remove</profiles>
+                            <build>remove</build>
+                            <repositories>remove</repositories>
+                            <pluginRepositories>remove</pluginRepositories>
+                        </pomElements>
+                    </configuration>
+                    <executions>
+                        <execution>
+                            <id>flatten</id>
+                            <goals>
+                                <goal>flatten</goal>
+                            </goals>
+                            <phase>process-resources</phase>
+                        </execution>
+                    </executions>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
 </project>
diff --git a/assemblies/web-war/pom.xml b/assemblies/web-war/pom.xml
new file mode 100644
index 0000000000..e1815b8b7d
--- /dev/null
+++ b/assemblies/web-war/pom.xml
@@ -0,0 +1,233 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~       http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.hop</groupId>
+        <artifactId>hop-assemblies</artifactId>
+        <version>2.21.0-SNAPSHOT</version>
+    </parent>
+
+    <!--
+      Hop Web for a plain servlet container (Tomcat 10.1 or later):
+
+        hop-web-<version>.war          the web app: the RAP front end from 
hop-assemblies-web
+                                       plus the client's lib/core in 
WEB-INF/lib, the start
+                                       scripts and config. Deploy it as 
webapps/ROOT.war.
+        hop-web-<version>-plugins.zip  plugins/ and jdbc-drivers/, unzipped 
into CATALINA_BASE.
+                                       Hop Web finds them there when 
HOP_PLUGIN_BASE_FOLDERS and
+                                       HOP_SHARED_JDBC_FOLDERS are not set 
(HopWebDefaults).
+
+      The same layout is left unpacked in target/webapp and target/tomcat, and 
the Docker
+      images are built from those folders.
+    -->
+    <artifactId>hop-web</artifactId>
+    <packaging>pom</packaging>
+    <name>Hop Web</name>
+
+    <properties>
+        
<hop-web.client.dir>${project.build.directory}/client</hop-web.client.dir>
+        
<hop-web.tomcat.dir>${project.build.directory}/tomcat</hop-web.tomcat.dir>
+        
<hop-web.webapp.dir>${project.build.directory}/webapp</hop-web.webapp.dir>
+        <!-- Published to Maven Central next to hop-client, with a flattened 
POM. -->
+        <maven.deploy.skip>false</maven.deploy.skip>
+    </properties>
+
+    <!-- Build inputs only. Both are unpacked as they are, so none of their 
dependencies are
+         wanted. -->
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.hop</groupId>
+            <artifactId>hop-assemblies-web</artifactId>
+            <version>${project.version}</version>
+            <type>war</type>
+            <exclusions>
+                <exclusion>
+                    <groupId>*</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.hop</groupId>
+            <artifactId>hop-client</artifactId>
+            <version>${project.version}</version>
+            <type>zip</type>
+            <exclusions>
+                <exclusion>
+                    <groupId>*</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>flatten-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>unpack-web-and-client</id>
+                        <goals>
+                            <goal>unpack</goal>
+                        </goals>
+                        <phase>prepare-package</phase>
+                        <configuration>
+                            <!-- Unpack every time, so the replacements below 
always start from
+                                 the original files, even without a clean. -->
+                            <overWriteReleases>true</overWriteReleases>
+                            <overWriteSnapshots>true</overWriteSnapshots>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>org.apache.hop</groupId>
+                                    <artifactId>hop-assemblies-web</artifactId>
+                                    <version>${project.version}</version>
+                                    <type>war</type>
+                                    
<outputDirectory>${hop-web.webapp.dir}</outputDirectory>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>org.apache.hop</groupId>
+                                    <artifactId>hop-client</artifactId>
+                                    <version>${project.version}</version>
+                                    <type>zip</type>
+                                    
<includes>hop/config/**,hop/lib/core/**,hop/lib/jdbc/**,hop/plugins/**</includes>
+                                    
<outputDirectory>${hop-web.client.dir}</outputDirectory>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>lay-out-hop-web</id>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <phase>prepare-package</phase>
+                        <configuration>
+                            <target>
+                                <!-- The client's configuration replaces the 
web app's reduced one:
+                                     the samples of the plugin assemblies 
(transforms/, actions/,
+                                     datasets/ ...) are only there. First, so 
the hop-config.json
+                                     rewrite below applies to the copied file. 
-->
+                                <copy overwrite="true" 
todir="${hop-web.webapp.dir}/config">
+                                    <fileset 
dir="${hop-web.client.dir}/hop/config"></fileset>
+                                </copy>
+                                <!-- hop-ui-rcp is the desktop UI fragment. 
Its GuiPlugins fail on
+                                     RAP with NoClassDefFoundError for 
SWT-only types. -->
+                                <copy 
todir="${hop-web.webapp.dir}/WEB-INF/lib">
+                                    <fileset 
dir="${hop-web.client.dir}/hop/lib/core" excludes="hop-ui-rcp-*.jar"></fileset>
+                                </copy>
+                                <copy todir="${hop-web.tomcat.dir}/plugins">
+                                    <fileset 
dir="${hop-web.client.dir}/hop/plugins"></fileset>
+                                </copy>
+                                <copy 
todir="${hop-web.tomcat.dir}/jdbc-drivers">
+                                    <fileset 
dir="${hop-web.client.dir}/hop/lib/jdbc"></fileset>
+                                </copy>
+                                <!-- Not part of the war or the zip. The 
images install the
+                                     marketplace-optional plugins here with
+                                     tools/install-wave1-plugins.sh, and 
docker/web.Dockerfile
+                                     copies these folders, so they must exist 
even when empty. -->
+                                <mkdir 
dir="${project.build.directory}/optional/config"></mkdir>
+                                <mkdir 
dir="${project.build.directory}/optional/plugins"></mkdir>
+                                <mkdir 
dir="${project.build.directory}/optional/lib/core"></mkdir>
+                                <mkdir 
dir="${project.build.directory}/optional/lib/jdbc"></mkdir>
+                                <!-- The scripts run from the web app folder: 
Hop is in WEB-INF/lib
+                                     and the servlet API in the container's 
lib folder. -->
+                                <replace dir="${hop-web.webapp.dir}" 
includes="hop,*.sh" token="lib/core/*" 
value="../../lib/*:WEB-INF/lib/*:lib/core/*"></replace>
+                                <replace dir="${hop-web.webapp.dir}" 
includes="*.bat" token="lib\core\*" 
value="..\..\lib\*;WEB-INF\lib\*;lib\core\*"></replace>
+                                <!-- Hop Web finds plugins/ and jdbc-drivers/ 
in CATALINA_BASE by
+                                     itself (HopWebDefaults); give the tools 
the same defaults,
+                                     relative to webapps/ROOT like the 
classpath above.
+                                     Every literal ${ is written 
${hop-web.dollar}{: written out, it
+                                     would be expanded at build time from the 
environment of
+                                     whoever runs the build. -->
+                                <property name="hop-web.dollar" 
value="$"></property>
+                                <replace dir="${hop-web.webapp.dir}" 
includes="hop,*.sh" token="if [ -n 
&quot;${hop-web.dollar}{HOP_PLUGIN_BASE_FOLDERS}&quot; ]; then" value="if [ -z 
&quot;$HOP_PLUGIN_BASE_FOLDERS&quot; ]; then 
HOP_PLUGIN_BASE_FOLDERS=../../plugins; fi; if [ -n 
&quot;${hop-web.dollar}{HOP_PLUGIN_BASE_FOLDERS}&quot; ]; then"></replace>
+                                <replace dir="${hop-web.webapp.dir}" 
includes="hop,*.sh" token="if [ -n 
&quot;${hop-web.dollar}{HOP_SHARED_JDBC_FOLDERS}&quot; ]; then" value="if [ -z 
&quot;$HOP_SHARED_JDBC_FOLDERS&quot; ]; then 
HOP_SHARED_JDBC_FOLDERS=../../jdbc-drivers; fi; if [ -n 
&quot;${hop-web.dollar}{HOP_SHARED_JDBC_FOLDERS}&quot; ]; then"></replace>
+                                <!-- And the configuration folder: 
hop-config.json refers to it as
+                                     ${HOP_CONFIG_FOLDER}, so the variable has 
to be set. -->
+                                <replace dir="${hop-web.webapp.dir}" 
includes="hop,*.sh" token="if [ -n 
&quot;${hop-web.dollar}{HOP_CONFIG_FOLDER}&quot; ]; then" value="if [ -z 
&quot;$HOP_CONFIG_FOLDER&quot; ]; then 
HOP_CONFIG_FOLDER=&quot;$PWD/config&quot;; fi; if [ -n 
&quot;${hop-web.dollar}{HOP_CONFIG_FOLDER}&quot; ]; then"></replace>
+                                <replace dir="${hop-web.webapp.dir}" 
includes="*.bat">
+                                    <replacetoken>if not 
"%HOP_CONFIG_FOLDER%"=="" (</replacetoken>
+                                    <replacevalue>if "%HOP_CONFIG_FOLDER%"=="" 
set "HOP_CONFIG_FOLDER=%CD%\config"
+if not "%HOP_CONFIG_FOLDER%"=="" (</replacevalue>
+                                </replace>
+                                <replace dir="${hop-web.webapp.dir}" 
includes="*.bat">
+                                    <replacetoken>if not 
"%HOP_PLUGIN_BASE_FOLDERS%"=="" (</replacetoken>
+                                    <replacevalue>if 
"%HOP_PLUGIN_BASE_FOLDERS%"=="" set "HOP_PLUGIN_BASE_FOLDERS=..\..\plugins"
+if not "%HOP_PLUGIN_BASE_FOLDERS%"=="" (</replacevalue>
+                                </replace>
+                                <replace dir="${hop-web.webapp.dir}" 
includes="*.bat">
+                                    <replacetoken>if not 
"%HOP_SHARED_JDBC_FOLDERS%"=="" (</replacetoken>
+                                    <replacevalue>if 
"%HOP_SHARED_JDBC_FOLDERS%"=="" set "HOP_SHARED_JDBC_FOLDERS=..\..\jdbc-drivers"
+if not "%HOP_SHARED_JDBC_FOLDERS%"=="" (</replacevalue>
+                                </replace>
+                                <!-- Projects live in the configuration 
folder, wherever that is. -->
+                                <replace 
file="${hop-web.webapp.dir}/config/hop-config.json" token="config/projects" 
value="${hop-web.dollar}{HOP_CONFIG_FOLDER}/projects"></replace>
+                            </target>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>plugins</id>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <phase>package</phase>
+                        <configuration>
+                            <descriptors>
+                                
<descriptor>src/assembly/plugins.xml</descriptor>
+                            </descriptors>
+                            <appendAssemblyId>true</appendAssemblyId>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>war</id>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <phase>package</phase>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>src/assembly/war.xml</descriptor>
+                            </descriptors>
+                            <appendAssemblyId>false</appendAssemblyId>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/assemblies/web-war/src/assembly/plugins.xml 
b/assemblies/web-war/src/assembly/plugins.xml
new file mode 100644
index 0000000000..0b9af42fa5
--- /dev/null
+++ b/assemblies/web-war/src/assembly/plugins.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~       http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!-- hop-web-<version>-plugins.zip: plugins/ and jdbc-drivers/, to unzip into 
CATALINA_BASE. -->
+<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.2.0";
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+          xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.2.0 
http://maven.apache.org/xsd/assembly-2.2.0.xsd";>
+    <id>plugins</id>
+    <formats>
+        <format>zip</format>
+    </formats>
+    <includeBaseDirectory>false</includeBaseDirectory>
+    <fileSets>
+        <fileSet>
+            <directory>${hop-web.tomcat.dir}</directory>
+            <outputDirectory>.</outputDirectory>
+        </fileSet>
+        <!-- In a folder of their own, so unzipping into CATALINA_BASE leaves 
Tomcat's LICENSE
+             and NOTICE alone. -->
+        <fileSet>
+            <directory>${hop-web.webapp.dir}</directory>
+            <outputDirectory>hop-licenses</outputDirectory>
+            <includes>
+                <include>LICENSE</include>
+                <include>NOTICE</include>
+                <include>licenses/**</include>
+            </includes>
+        </fileSet>
+    </fileSets>
+</assembly>
diff --git a/assemblies/web-war/src/assembly/war.xml 
b/assemblies/web-war/src/assembly/war.xml
new file mode 100644
index 0000000000..e7bb9f4f6f
--- /dev/null
+++ b/assemblies/web-war/src/assembly/war.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~       http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!-- hop-web-<version>.war, packed from the folder the antrun step laid out. 
-->
+<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.2.0";
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+          xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.2.0 
http://maven.apache.org/xsd/assembly-2.2.0.xsd";>
+    <id>war</id>
+    <formats>
+        <format>war</format>
+    </formats>
+    <includeBaseDirectory>false</includeBaseDirectory>
+    <fileSets>
+        <fileSet>
+            <directory>${hop-web.webapp.dir}</directory>
+            <outputDirectory>.</outputDirectory>
+            <excludes>
+                <exclude>hop</exclude>
+                <exclude>*.sh</exclude>
+            </excludes>
+        </fileSet>
+        <fileSet>
+            <directory>${hop-web.webapp.dir}</directory>
+            <outputDirectory>.</outputDirectory>
+            <includes>
+                <include>hop</include>
+                <include>*.sh</include>
+            </includes>
+            <fileMode>0755</fileMode>
+        </fileSet>
+    </fileSets>
+</assembly>
diff --git a/docker/create_hop_web_container.sh 
b/docker/create_hop_web_container.sh
index cdd5aa4304..8f5d57923e 100755
--- a/docker/create_hop_web_container.sh
+++ b/docker/create_hop_web_container.sh
@@ -21,29 +21,20 @@
 #
 cd "${0%/*}"
 
-# unzip files for docker image
+# web.Dockerfile builds the image from assemblies/web-war/target (run the 
Maven build first)
 #
-unzip -qu ../assemblies/web/target/hop.war -d ../assemblies/web/target/webapp
-unzip -qu ../assemblies/plugins/target/hop-assemblies-*.zip -d 
../assemblies/plugins/target/
-unzip -quj ../assemblies/lib-jdbc/target/hop-assemblies-*.zip -d 
../assemblies/lib-jdbc/target/jdbc-drivers
+WEBAPP=../assemblies/web-war/target/webapp
+OPTIONAL=../assemblies/web-war/target/optional
+mkdir -p ${OPTIONAL}/config ${OPTIONAL}/plugins ${OPTIONAL}/lib/core 
${OPTIONAL}/lib/jdbc
 
 # copy recent changes in libraries...
 #
-ls -lrt ../assemblies/web/target/webapp/WEB-INF/lib/
-
 echo "Copying Hop jar file from the target folders."
-cp ../core/target/hop-core-*SNAPSHOT.jar 
../assemblies/web/target/webapp/WEB-INF/lib/
-cp ../engine/target/hop-engine-*SNAPSHOT.jar 
../assemblies/web/target/webapp/WEB-INF/lib
-cp ../ui/target/hop-ui-*SNAPSHOT.jar 
../assemblies/web/target/webapp/WEB-INF/lib/
-cp ../rap/target/hop-*SNAPSHOT.jar ../assemblies/web/target/webapp/WEB-INF/lib/
-
-# copy recent changes to a few plugins
-#
-cp ../plugins/engines/beam/target/hop-plugins*.jar 
../assemblies/plugins/target/plugins/engines/beam/
+cp ../core/target/hop-core-*SNAPSHOT.jar ${WEBAPP}/WEB-INF/lib/
+cp ../engine/target/hop-engine-*SNAPSHOT.jar ${WEBAPP}/WEB-INF/lib/
+cp ../ui/target/hop-ui-*SNAPSHOT.jar ${WEBAPP}/WEB-INF/lib/
+cp ../rap/target/hop-*SNAPSHOT.jar ${WEBAPP}/WEB-INF/lib/
 
 #build docker image
 docker build ../ -f web.Dockerfile -t hop-web
 
-#cleanup
-rm -rf ../assemblies/web/target/webapp
-rm -rf ../assemblies/plugins/target/plugins
diff --git a/docker/run-hop-web-local-with-basic.sh 
b/docker/run-hop-web-local-with-basic.sh
index 6ce1a63d6d..f929fd1906 100755
--- a/docker/run-hop-web-local-with-basic.sh
+++ b/docker/run-hop-web-local-with-basic.sh
@@ -165,17 +165,16 @@ overlay_module_jars() {
 }
 
 prepare_webapp() {
-  local war="${PROJECT_ROOT}/assemblies/web/target/hop.war"
-  local webapp="${PROJECT_ROOT}/assemblies/web/target/webapp"
-  local client_lib="${PROJECT_ROOT}/assemblies/client/target/hop/lib/core"
-  [[ -f "${war}" ]] || die "hop.war not found"
-  log "Preparing exploded web application"
-  rm -rf "${webapp}"
-  unzip -q "${war}" -d "${webapp}"
-  log "Overlaying latest Hop module JARs"
+  # web.Dockerfile builds the image from assemblies/web-war/target (webapp, 
tomcat, optional).
+  local webapp="${PROJECT_ROOT}/assemblies/web-war/target/webapp"
+
+  [[ -d "${webapp}/WEB-INF/lib" ]] || die "Hop Web not found at ${webapp}. Run 
the Maven build first."
+  local optional="${PROJECT_ROOT}/assemblies/web-war/target/optional"
+  mkdir -p "${optional}/config" "${optional}/plugins" "${optional}/lib/core" 
"${optional}/lib/jdbc"
+
+  # Overlay fresh module JARs so the image picks up local changes without 
rebuilding the war.
+  log "Overlaying latest Hop module JARs (core, engine, ui, rap)"
   overlay_module_jars "${webapp}/WEB-INF/lib"
-  overlay_module_jars "${client_lib}"
-  rm -f "${webapp}/WEB-INF/lib"/hop-ui-rcp-*.jar
 }
 
 build_image() {
@@ -186,7 +185,6 @@ build_image() {
   [[ "${DOCKER_NO_CACHE}" == "true" ]] && cache_flag=(--no-cache)
   log "Building Docker image ${IMAGE_NAME}"
   docker build "${PROJECT_ROOT}" -f "${SCRIPT_DIR}/web.Dockerfile" -t 
"${IMAGE_NAME}" "${cache_flag[@]}"
-  rm -rf "${PROJECT_ROOT}/assemblies/web/target/webapp"
 }
 
 wait_for_hop_web() {
diff --git a/docker/run-hop-web-local-with-oauth.sh 
b/docker/run-hop-web-local-with-oauth.sh
index 08d9b516df..fe9057efbc 100755
--- a/docker/run-hop-web-local-with-oauth.sh
+++ b/docker/run-hop-web-local-with-oauth.sh
@@ -243,17 +243,16 @@ overlay_module_jars() {
 }
 
 prepare_webapp() {
-  local war="${PROJECT_ROOT}/assemblies/web/target/hop.war"
-  local webapp="${PROJECT_ROOT}/assemblies/web/target/webapp"
-  local client_lib="${PROJECT_ROOT}/assemblies/client/target/hop/lib/core"
-  [[ -f "${war}" ]] || die "hop.war not found"
-  log "Preparing exploded web application"
-  rm -rf "${webapp}"
-  unzip -q "${war}" -d "${webapp}"
-  log "Overlaying latest Hop module JARs"
+  # web.Dockerfile builds the image from assemblies/web-war/target (webapp, 
tomcat, optional).
+  local webapp="${PROJECT_ROOT}/assemblies/web-war/target/webapp"
+
+  [[ -d "${webapp}/WEB-INF/lib" ]] || die "Hop Web not found at ${webapp}. Run 
the Maven build first."
+  local optional="${PROJECT_ROOT}/assemblies/web-war/target/optional"
+  mkdir -p "${optional}/config" "${optional}/plugins" "${optional}/lib/core" 
"${optional}/lib/jdbc"
+
+  # Overlay fresh module JARs so the image picks up local changes without 
rebuilding the war.
+  log "Overlaying latest Hop module JARs (core, engine, ui, rap)"
   overlay_module_jars "${webapp}/WEB-INF/lib"
-  overlay_module_jars "${client_lib}"
-  rm -f "${webapp}/WEB-INF/lib"/hop-ui-rcp-*.jar
 }
 
 build_image() {
@@ -264,7 +263,6 @@ build_image() {
   [[ "${DOCKER_NO_CACHE}" == "true" ]] && cache_flag=(--no-cache)
   log "Building Docker image ${IMAGE_NAME}"
   docker build "${PROJECT_ROOT}" -f "${SCRIPT_DIR}/web.Dockerfile" -t 
"${IMAGE_NAME}" "${cache_flag[@]}"
-  rm -rf "${PROJECT_ROOT}/assemblies/web/target/webapp"
 }
 
 # Defaults that depend on --port
diff --git a/docker/run-hop-web-local-with-users.sh 
b/docker/run-hop-web-local-with-users.sh
index 8a47c8d78a..c9a7709f64 100755
--- a/docker/run-hop-web-local-with-users.sh
+++ b/docker/run-hop-web-local-with-users.sh
@@ -216,22 +216,16 @@ overlay_module_jars() {
 }
 
 prepare_webapp() {
-  local war="${PROJECT_ROOT}/assemblies/web/target/hop.war"
-  local webapp="${PROJECT_ROOT}/assemblies/web/target/webapp"
-  local client_lib="${PROJECT_ROOT}/assemblies/client/target/hop/lib/core"
+  # web.Dockerfile builds the image from assemblies/web-war/target (webapp, 
tomcat, optional).
+  local webapp="${PROJECT_ROOT}/assemblies/web-war/target/webapp"
 
-  [[ -f "${war}" ]] || die "hop.war not found at ${war}. Run Maven build 
first."
-
-  log "Preparing exploded web application"
-  rm -rf "${webapp}"
-  unzip -q "${war}" -d "${webapp}"
+  [[ -d "${webapp}/WEB-INF/lib" ]] || die "Hop Web not found at ${webapp}. Run 
the Maven build first."
+  local optional="${PROJECT_ROOT}/assemblies/web-war/target/optional"
+  mkdir -p "${optional}/config" "${optional}/plugins" "${optional}/lib/core" 
"${optional}/lib/jdbc"
 
+  # Overlay fresh module JARs so the image picks up local changes without 
rebuilding the war.
   log "Overlaying latest Hop module JARs (core, engine, ui, rap)"
   overlay_module_jars "${webapp}/WEB-INF/lib"
-  overlay_module_jars "${client_lib}"
-
-  rm -f "${webapp}/WEB-INF/lib"/hop-ui-rcp-*.jar
-  log "Removed hop-ui-rcp from staged webapp WEB-INF/lib (Hop Web must use 
hop-ui-rap only)"
 }
 
 build_image() {
@@ -250,8 +244,6 @@ build_image() {
     -t "${IMAGE_NAME}" \
     "${cache_flag[@]}"
 
-  log "Cleaning up exploded webapp staging directory"
-  rm -rf "${PROJECT_ROOT}/assemblies/web/target/webapp"
 }
 
 validate_auth_config() {
diff --git a/docker/run-hop-web-local.sh b/docker/run-hop-web-local.sh
index 3618a4d6a6..ae45af8fe8 100755
--- a/docker/run-hop-web-local.sh
+++ b/docker/run-hop-web-local.sh
@@ -197,26 +197,16 @@ overlay_module_jars() {
 }
 
 prepare_webapp() {
-  local war="${PROJECT_ROOT}/assemblies/web/target/hop.war"
-  local webapp="${PROJECT_ROOT}/assemblies/web/target/webapp"
-  local client_lib="${PROJECT_ROOT}/assemblies/client/target/hop/lib/core"
+  # web.Dockerfile builds the image from assemblies/web-war/target (webapp, 
tomcat, optional).
+  local webapp="${PROJECT_ROOT}/assemblies/web-war/target/webapp"
 
-  [[ -f "${war}" ]] || die "hop.war not found at ${war}. Run Maven build 
first."
+  [[ -d "${webapp}/WEB-INF/lib" ]] || die "Hop Web not found at ${webapp}. Run 
the Maven build first."
+  local optional="${PROJECT_ROOT}/assemblies/web-war/target/optional"
+  mkdir -p "${optional}/config" "${optional}/plugins" "${optional}/lib/core" 
"${optional}/lib/jdbc"
 
-  log "Preparing exploded web application"
-  rm -rf "${webapp}"
-  unzip -q "${war}" -d "${webapp}"
-
-  # web.Dockerfile copies client lib/core AFTER the webapp, overwriting 
WEB-INF/lib.
-  # Overlay fresh module JARs in both places so the image picks up local 
changes.
+  # Overlay fresh module JARs so the image picks up local changes without 
rebuilding the war.
   log "Overlaying latest Hop module JARs (core, engine, ui, rap)"
   overlay_module_jars "${webapp}/WEB-INF/lib"
-  overlay_module_jars "${client_lib}"
-
-  # Do not leave the desktop RCP UI fragment on the Hop Web classpath (see 
web.Dockerfile).
-  # Stripping here keeps the staged webapp correct even if Dockerfile is 
bypassed.
-  rm -f "${webapp}/WEB-INF/lib"/hop-ui-rcp-*.jar
-  log "Removed hop-ui-rcp from staged webapp WEB-INF/lib (Hop Web must use 
hop-ui-rap only)"
 }
 
 build_image() {
@@ -235,8 +225,6 @@ build_image() {
     -t "${IMAGE_NAME}" \
     "${cache_flag[@]}"
 
-  log "Cleaning up exploded webapp staging directory"
-  rm -rf "${PROJECT_ROOT}/assemblies/web/target/webapp"
 }
 
 wait_for_hop_web() {
diff --git a/docker/unified.Dockerfile b/docker/unified.Dockerfile
index 13000fba0c..dc7fe314d8 100644
--- a/docker/unified.Dockerfile
+++ b/docker/unified.Dockerfile
@@ -104,13 +104,14 @@ WORKDIR /build
 
 # Copy pre-built artifacts from context (must exist!)
 COPY ./assemblies/client/target/hop-client-*.zip 
/build/assemblies/client/target/
-COPY ./assemblies/web/target/hop.war /build/assemblies/web/target/
+COPY ./assemblies/web-war/target/hop-web-*.war 
/build/assemblies/web-war/target/
+COPY ./assemblies/web-war/target/hop-web-*-plugins.zip 
/build/assemblies/web-war/target/
 COPY ./assemblies/plugins/target/hop-assemblies-*.zip 
/build/assemblies/plugins/target/
 COPY ./docker/resources/ /build/docker/resources/
 
 # builder-fast produces the same artifacts as builder-full:
 # - /build/assemblies/client/target/hop-client-*.zip
-# - /build/assemblies/web/target/hop.war
+# - /build/assemblies/web-war/target/hop-web-*.war and hop-web-*-plugins.zip
 # - /build/assemblies/plugins/target/hop-assemblies-*.zip
 # - /build/docker/resources/*
 #
@@ -172,13 +173,15 @@ RUN echo "=== Extracting assemblies ===" && \
     else \
         echo "ERROR: Client assembly not found" && exit 1; \
     fi && \
-    # Unzip web assembly
-    if [ -f assemblies/web/target/hop.war ]; then \
-        cd assemblies/web/target && \
-        unzip -q hop.war -d webapp && \
+    # Unzip Hop Web: the war and the plugins zip from assemblies/web-war
+    if ls assemblies/web-war/target/hop-web-*-plugins.zip 1> /dev/null 2>&1; 
then \
+        cd assemblies/web-war/target && \
+        rm -rf webapp tomcat && \
+        unzip -q "$(ls hop-web-*.war | head -1)" -d webapp && \
+        unzip -q "$(ls hop-web-*-plugins.zip | head -1)" -d tomcat && \
         cd /build; \
     else \
-        echo "WARNING: Web assembly not found, skipping"; \
+        echo "WARNING: Hop Web assembly not found, skipping"; \
     fi && \
     # Unzip plugins assembly
     if [ -d assemblies/plugins/target ] && ls 
assemblies/plugins/target/hop-assemblies-*.zip 1> /dev/null 2>&1; then \
@@ -211,7 +214,9 @@ RUN if [ "${INCLUDE_OPTIONAL_PLUGINS}" = "true" ]; then \
         echo "Hop version: ${HOP_VERSION}" && \
         export HOP_VERSION && \
         export HOP_PLUGIN_ZIP_DIR=/build/optional-plugin-zips && \
-        bash /build/tools/install-wave1-plugins.sh 
/build/assemblies/client/target/hop; \
+        bash /build/tools/install-wave1-plugins.sh 
/build/assemblies/client/target/hop && \
+        mkdir -p /build/assemblies/web-war/target/optional && \
+        bash /build/tools/install-wave1-plugins.sh 
/build/assemblies/web-war/target/optional; \
     else \
         echo "=== Skipping marketplace-optional plugins 
(INCLUDE_OPTIONAL_PLUGINS=false) ==="; \
     fi
@@ -238,15 +243,18 @@ RUN if [ "${SKIP_FAT_JAR}" = "false" ]; then \
     fi
 
 # Step 3: Prepare optimized directory structures for final images
-RUN mkdir -p /build/hop-web-prepared/webapps/ROOT && \
-    cp -r /build/assemblies/web/target/webapp/* 
/build/hop-web-prepared/webapps/ROOT/ && \
-    cp -r /build/assemblies/client/target/hop/config 
/build/hop-web-prepared/webapps/ROOT/ && \
-    cp -r /build/assemblies/client/target/hop/plugins /build/hop-web-prepared/ 
&& \
-    cp -r /build/assemblies/client/target/hop/lib/jdbc/ 
/build/hop-web-prepared/jdbc-drivers && \
-    # Beam SDKs unpack under lib/core when the marketplace Beam plugin is 
installed (#7721/#7722).
-    # Legacy plugins/engines/beam/lib-beam is no longer produced; do not 
require it (apache/hop#7748).
-    cp -r /build/assemblies/client/target/hop/lib/core/* 
/build/hop-web-prepared/webapps/ROOT/WEB-INF/lib/ && \
-    rm /build/hop-web-prepared/webapps/ROOT/WEB-INF/lib/hop-ui-rcp* && \
+# Hop Web is the war plus the plugins zip from assemblies/web-war, and the 
optional plugins when
+# step 1b installed them: their plugins next to the others, their lib/core 
jars (the Beam SDKs,
+# for one) in WEB-INF/lib, their JDBC drivers and their sample projects.
+RUN OPTIONAL=/build/assemblies/web-war/target/optional && \
+    mkdir -p /build/hop-web-prepared/webapps/ROOT \
+             "${OPTIONAL}/config" "${OPTIONAL}/plugins" "${OPTIONAL}/lib/core" 
"${OPTIONAL}/lib/jdbc" && \
+    cp -r /build/assemblies/web-war/target/webapp/. 
/build/hop-web-prepared/webapps/ROOT/ && \
+    cp -r /build/assemblies/web-war/target/tomcat/. /build/hop-web-prepared/ 
&& \
+    cp -r "${OPTIONAL}/plugins/." /build/hop-web-prepared/plugins/ && \
+    cp -r "${OPTIONAL}/lib/core/." 
/build/hop-web-prepared/webapps/ROOT/WEB-INF/lib/ && \
+    cp -r "${OPTIONAL}/lib/jdbc/." /build/hop-web-prepared/jdbc-drivers/ && \
+    cp -r "${OPTIONAL}/config/." /build/hop-web-prepared/webapps/ROOT/config/ 
&& \
     cp /build/docker/resources/run-web.sh /build/hop-web-prepared/run-web.sh 
&& \
     chmod +x /build/hop-web-prepared/run-web.sh && \
     # Tomcat configuration with response compression (see the comments in the 
file)
@@ -254,20 +262,7 @@ RUN mkdir -p /build/hop-web-prepared/webapps/ROOT && \
     cp /build/docker/resources/server.xml 
/build/hop-web-prepared/conf/server.xml
 
 # Make scripts executable
-RUN chmod +x /build/hop-web-prepared/webapps/ROOT/*.sh
-
-    # Fix hop-config.json
-RUN sed -i 's/config\/projects/${HOP_CONFIG_FOLDER}\/projects/g' 
/build/hop-web-prepared/webapps/ROOT/config/hop-config.json
-
-# Set the correct classpath for hop scripts. hop (no suffix) is the 
marketplace entrypoint.
-RUN sed -i 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' 
/build/hop-web-prepared/webapps/ROOT/hop
-RUN sed -i 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' 
/build/hop-web-prepared/webapps/ROOT/hop-run.sh
-RUN sed -i 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' 
/build/hop-web-prepared/webapps/ROOT/hop-conf.sh
-RUN sed -i 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' 
/build/hop-web-prepared/webapps/ROOT/hop-search.sh
-RUN sed -i 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' 
/build/hop-web-prepared/webapps/ROOT/hop-encrypt.sh
-RUN sed -i 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' 
/build/hop-web-prepared/webapps/ROOT/hop-import.sh
-RUN sed -i 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' 
/build/hop-web-prepared/webapps/ROOT/hop-search.sh
-
+RUN chmod +x /build/hop-web-prepared/webapps/ROOT/hop 
/build/hop-web-prepared/webapps/ROOT/*.sh
 
 # Prepare Hop Client directory structure
 RUN mkdir -p /build/hop-client-prepared && \
diff --git a/docker/web.Dockerfile b/docker/web.Dockerfile
index 68a5b9218c..f393f0ea3a 100644
--- a/docker/web.Dockerfile
+++ b/docker/web.Dockerfile
@@ -87,40 +87,25 @@ RUN apt-get update \
     && mkdir -p "${HOP_AUDIT_FOLDER}" \
     && chown hop:hop "${HOP_AUDIT_FOLDER}"
 
-# Copy resources
-# lib/core includes Beam SDKs when the Beam marketplace plugin is installed 
into the client
-# (e.g. tools/install-wave1-plugins.sh). Do not COPY 
plugins/engines/beam/lib-beam: that path
-# was removed in #7721 / #7722 (SDKs now unpack under lib/core). An 
unconditional COPY fails
-# docker buildx when the directory is missing (apache/hop#7748).
-COPY ./assemblies/web/target/webapp/ "${CATALINA_HOME}"/webapps/ROOT/
-COPY ./assemblies/client/target/hop/config 
"${CATALINA_HOME}"/webapps/ROOT/config
-COPY ./assemblies/client/target/hop/lib/core 
"${CATALINA_HOME}"/webapps/ROOT/WEB-INF/lib
-COPY ./assemblies/client/target/hop/plugins "${CATALINA_HOME}"/plugins
-COPY ./assemblies/client/target/hop/lib/jdbc/ "${CATALINA_HOME}"/jdbc-drivers
+# Hop Web as assemblies/web-war lays it out (the same content as 
hop-web-<version>.war and
+# hop-web-<version>-plugins.zip): the web app, then plugins/ and jdbc-drivers/ 
into CATALINA_HOME.
+COPY ./assemblies/web-war/target/webapp/ "${CATALINA_HOME}"/webapps/ROOT/
+COPY ./assemblies/web-war/target/tomcat/ "${CATALINA_HOME}"/
+# Marketplace-optional plugins, when tools/install-wave1-plugins.sh installed 
them into
+# target/optional (Jenkins does): their plugins, their jars under lib/core 
(the Beam SDKs, for
+# one) into WEB-INF/lib, their JDBC drivers and their sample projects. The 
folders exist, empty,
+# after every build.
+COPY ./assemblies/web-war/target/optional/plugins/ "${CATALINA_HOME}"/plugins/
+COPY ./assemblies/web-war/target/optional/lib/core/ 
"${CATALINA_HOME}"/webapps/ROOT/WEB-INF/lib/
+COPY ./assemblies/web-war/target/optional/lib/jdbc/ 
"${CATALINA_HOME}"/jdbc-drivers/
+COPY ./assemblies/web-war/target/optional/config/ 
"${CATALINA_HOME}"/webapps/ROOT/config/
 COPY --chown=hop ./docker/resources/run-web.sh /tmp/
 # Tomcat configuration with response compression (see the comments in the file)
 COPY ./docker/resources/server.xml "${CATALINA_HOME}"/conf/server.xml
 
-# Desktop (RCP) UI fragment must not ship in Hop Web. Client lib/core is 
shared with the
-# desktop assembly and includes hop-ui-rcp; loading its GuiPlugins (e.g. 
ContentEditorWidget)
-# fails on RAP with NoClassDefFoundError for SWT types such as 
VerifyKeyListener.
-RUN rm -f "${CATALINA_HOME}"/webapps/ROOT/WEB-INF/lib/hop-ui-rcp-*.jar
-
-# Fix hop-config.json
-RUN sed -i 's/config\/projects/${HOP_CONFIG_FOLDER}\/projects/g' 
"${CATALINA_HOME}"/webapps/ROOT/config/hop-config.json
-
 RUN mkdir -p "$CATALINA_HOME"/lib/swt/linux/x86_64
 
-# set the correct classpath for hop, hop-conf and hop-run
-RUN  sed -i 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' 
${CATALINA_HOME}/webapps/ROOT/hop
-RUN  sed -i 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' 
${CATALINA_HOME}/webapps/ROOT/hop-run.sh
-RUN  sed -i 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' 
${CATALINA_HOME}/webapps/ROOT/hop-conf.sh
-RUN  sed -i 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' 
${CATALINA_HOME}/webapps/ROOT/hop-search.sh
-RUN  sed -i 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' 
${CATALINA_HOME}/webapps/ROOT/hop-encrypt.sh
-RUN  sed -i 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' 
${CATALINA_HOME}/webapps/ROOT/hop-import.sh
-RUN  sed -i 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' 
${CATALINA_HOME}/webapps/ROOT/hop-search.sh
-
-RUN chmod +x ${CATALINA_HOME}/webapps/ROOT/*.sh
+RUN chmod +x ${CATALINA_HOME}/webapps/ROOT/hop 
${CATALINA_HOME}/webapps/ROOT/*.sh
 
 # point to the plugins folder
 ENV HOP_PLUGIN_BASE_FOLDERS=$CATALINA_HOME/plugins
diff --git 
a/docs/hop-dev-manual/modules/ROOT/pages/apache-release/creating-a-release.adoc 
b/docs/hop-dev-manual/modules/ROOT/pages/apache-release/creating-a-release.adoc
index de6517586e..ebfab8fe36 100644
--- 
a/docs/hop-dev-manual/modules/ROOT/pages/apache-release/creating-a-release.adoc
+++ 
b/docs/hop-dev-manual/modules/ROOT/pages/apache-release/creating-a-release.adoc
@@ -68,22 +68,24 @@ Two independent switches control this, and mixing them up 
is what breaks the mar
 |Property |Gates
 
 |`assemblies`
-|The `assemblies/` reactor: `hop-client`, `hop-assemblies-web` (`hop.war`),
-`hop-assemblies-plugins`, `hop-assemblies-static` and `hop-assemblies-debug`. 
The release
-builds it, and only `hop-client` is deployed. The `assemblies` parent sets
-`maven.deploy.skip`, and `hop-client` switches it back off.
+|The `assemblies/` reactor: `hop-client`, `hop-web` (`assemblies/web-war`),
+`hop-assemblies-web` (`hop.war`), `hop-assemblies-plugins`, 
`hop-assemblies-static` and
+`hop-assemblies-debug`. The release builds it, and only `hop-client` and 
`hop-web` are
+deployed. The `assemblies` parent sets `maven.deploy.skip`, and those two 
switch it back off.
 
 |`module.zips`
 |The per-module `artifactId-version.zip` attached next to each plugin jar. 
This is the
 artifact the marketplace installs, so a release must **never** disable it.
 |===
 
-Net effect on a release: every plugin zip is staged, and so is 
`hop-client-<version>.zip`.
-The other `assemblies/` modules are built but not staged.
+Net effect on a release: every plugin zip is staged, and so are 
`hop-client-<version>.zip`,
+`hop-web-<version>.war` and `hop-web-<version>-plugins.zip`. The other 
`assemblies/` modules
+are built but not staged.
 
-The staged `hop-client` POM is flattened: it has no parent and no 
dependencies, so
-`org.apache.hop:hop-client:<version>:zip` resolves on its own. Its 
dependencies are only
-inputs for the assembly and are left out of the deployed POM.
+The staged `hop-client` and `hop-web` POMs are flattened: they have no parent 
and no
+dependencies, so `org.apache.hop:hop-client:<version>:zip` and
+`org.apache.hop:hop-web:<version>:war` resolve on their own. Their 
dependencies are only
+inputs for the assemblies and are left out of the deployed POMs.
 
 They used to share the single `assemblies` property, so one 
`-Dassemblies=false` silently
 dropped every plugin zip while the build still reported `BUILD SUCCESS`. That 
is why the
@@ -92,7 +94,7 @@ zips are missing from Maven Central for 2.12.0-2.14.0 and 
2.16.0-2.18.1.
 WARNING: Do not add `-Dmodule.zips=false` or `-P=-assembly` (singular) to the 
release
 commands: either one drops every plugin zip while the build still reports 
`BUILD SUCCESS`.
 Do not add `-Dassemblies=false` or `-P=-assemblies` (plural) either: that 
leaves
-`hop-client` out of the staging repository. And do not pass 
`-Darguments="..."` on the
+`hop-client` and `hop-web` out of the staging repository. And do not pass 
`-Darguments="..."` on the
 command line, because it replaces the `<arguments>` configured in the root pom 
wholesale.
 Older versions of this guide passed `-P=-assemblies`; the root pom no longer 
does.
 
@@ -163,7 +165,9 @@ After the `release:perform` operation a staging repository 
will have been create
 * Go to the https://repository.apache.org/#stagingRepositories[Nexus staging 
repository] (Use your ASF credentials to log in)
 * Find Staged release its name will be orgapachehop-<number>
 * Do a quick check the repository contains the artifacts, including
-`org/apache/hop/hop-client/<version>/hop-client-<version>.zip`
+`org/apache/hop/hop-client/<version>/hop-client-<version>.zip`,
+`org/apache/hop/hop-web/<version>/hop-web-<version>.war` and
+`org/apache/hop/hop-web/<version>/hop-web-<version>-plugins.zip`
 * Select the repository and click on the Close button
 * Description when closing: Prepare Apache Hop <version>-rc<number> release
 * After a while, the status will go from open to closed
diff --git 
a/docs/hop-dev-manual/modules/ROOT/pages/apache-release/promoting-a-release.adoc
 
b/docs/hop-dev-manual/modules/ROOT/pages/apache-release/promoting-a-release.adoc
index 47106a26e7..38f1897f24 100644
--- 
a/docs/hop-dev-manual/modules/ROOT/pages/apache-release/promoting-a-release.adoc
+++ 
b/docs/hop-dev-manual/modules/ROOT/pages/apache-release/promoting-a-release.adoc
@@ -78,7 +78,7 @@ If it is gone, take a copy of the source code release and 
build the software fir
 [source,bash]
 ----
 unzip ./assemblies/client/target/hop-client-*.zip -d 
./assemblies/client/target/
-unzip ./assemblies/web/target/hop.war -d ./assemblies/web/target/webapp
+# docker/web.Dockerfile takes Hop Web from assemblies/web-war/target as the 
build left it
 
 # Create and push Dataflow template
 # Create hop-fatjar.jar
diff --git a/docs/hop-dev-manual/modules/ROOT/pages/hopweb/index.adoc 
b/docs/hop-dev-manual/modules/ROOT/pages/hopweb/index.adoc
index 2f00a34e85..7eeb4201e7 100644
--- a/docs/hop-dev-manual/modules/ROOT/pages/hopweb/index.adoc
+++ b/docs/hop-dev-manual/modules/ROOT/pages/hopweb/index.adoc
@@ -36,7 +36,7 @@ Before starting, ensure you have:
 
 == Build Hop
 
-Hop currently doesn't offer any standalone Hop Web builds.
+Each release publishes a war and a plugins zip for your own Tomcat 
(`org.apache.hop:hop-web` on Maven Central). The 
xref:{page-component-version}@manual::hop-gui/hop-web.adoc#hop-web-tomcat[user 
manual] explains how to deploy them. This page covers building them yourself.
 
 Running your own Hop Web environment is straightforward but requires you to 
build Hop. Follow the xref:setup-dev-environment.adoc[development environment 
setup] guide to get the Hop source code and build Hop.
 
@@ -53,156 +53,39 @@ Additional info in 
xref:hopweb/developer-guide.adoc#_building_the_hop_web_docker
 
 We'll use Apache Tomcat in this example. If you use another application 
server, the process should be similar.
 
-This version of Hop is built with Java {java-version}, so you'll need to 
https://tomcat.apache.org/download-10.cgi[download the latest Tomcat 10] (or 
use the official Tomcat 10 Docker image).
+This version of Hop is built with Java {java-version}, so you'll need 
https://tomcat.apache.org/download-10.cgi[Tomcat 10.1 or later] (or the 
official Tomcat 10 Docker image).
 
-Copy or extract the following files from your Hop build, where 
`$CATALINA_HOME` is your Tomcat installation folder.
+The build puts Hop Web for Tomcat in `assemblies/web-war`: 
`hop-web-<version>.war` and `hop-web-<version>-plugins.zip` in `target`, and 
the same content unpacked in `target/webapp` (the web application) and 
`target/tomcat` (`plugins` and `jdbc-drivers`).
+The scripts in the war already have the right classpath, `hop-ui-rcp` is left 
out, and `hop-config.json` registers the projects under 
`+${HOP_CONFIG_FOLDER}+`.
 
 [source,bash]
 ----
 # Set CATALINA_HOME if it's not already set (replace with your actual Tomcat 
installation path)
 export CATALINA_HOME="${CATALINA_HOME:-/path/to/your/tomcat}"
 
-# Step 1: Extract webapp to ROOT directory (not /hop/)
-unzip -o assemblies/web/target/hop.war -d $CATALINA_HOME/webapps/ROOT/
+# The web application, as ROOT (not /hop/)
+cp assemblies/web-war/target/hop-web-*.war $CATALINA_HOME/webapps/ROOT.war
 
-# Step 2: Extract client distribution (contains config, libs, plugins, JDBC 
drivers)
-unzip -o assemblies/client/target/hop-client-*.zip -d /tmp/hop-client/
-
-# Step 3: Copy config folder
-cp -r /tmp/hop-client/hop/config $CATALINA_HOME/webapps/ROOT/
-
-# Step 4: Copy core libraries
-# lib/core already includes Beam SDKs when the Beam marketplace plugin is 
installed into the
-# client (plugins/engines/beam/lib-beam is a legacy path and is no longer 
created).
-cp -r /tmp/hop-client/hop/lib/core/* $CATALINA_HOME/webapps/ROOT/WEB-INF/lib/
-
-# Step 4b: Remove RCP jar (RCP is for desktop GUI, not web)
-rm -f $CATALINA_HOME/webapps/ROOT/WEB-INF/lib/hop-ui-rcp-*.jar
-
-# Step 5: Copy plugins
-cp -r /tmp/hop-client/hop/plugins $CATALINA_HOME/
-
-# Step 6: Copy JDBC drivers
-mkdir -p $CATALINA_HOME/jdbc-drivers
-cp -r /tmp/hop-client/hop/lib/jdbc/* $CATALINA_HOME/jdbc-drivers/
-
-# Step 7: Cleanup
-rm -rf /tmp/hop-client
-----
-
-=== Modify startup script
-
-Configure Tomcat to run Hop by adding the information below to 
`$CATALINA_HOME/bin/startup.sh`.
-
-**Important**: You must insert these environment variables and `CATALINA_OPTS` 
*before* the `exec` line that starts Tomcat. The `exec` line should be the last 
line in the file and looks like:
-
-[source,bash]
-----
-exec "$PRGDIR"/"$EXECUTABLE" start "$@"
+# plugins/ and jdbc-drivers/
+unzip -o assemblies/web-war/target/hop-web-*-plugins.zip -d $CATALINA_HOME
 ----
 
-To find the correct insertion point:
-1. Open `$CATALINA_HOME/bin/startup.sh` in a text editor
-2. Search for the line containing `exec "$PRGDIR"/"$EXECUTABLE" start "$@"`
-3. Insert the code block below *immediately before* that line
-4. Ensure there is only *one* `exec` line in the file (if you see multiple, 
remove any duplicates after the first one)
+=== Settings
 
-Add the following code block:
+Hop Web finds `config` in the web application and `plugins` and `jdbc-drivers` 
in `$CATALINA_BASE` by itself (`HopWebDefaults`), so it starts without further 
settings.
+To change a folder or set other options, pass them as system properties in 
`$CATALINA_HOME/bin/setenv.sh`:
 
 [source,bash]
 ----
-
-export HOP_AES_ENCODER_KEY=
 # specify where Hop should store audit information
-export HOP_AUDIT_FOLDER="${CATALINA_HOME}/webapps/ROOT/audit"
-# specify where Hop should manage configuration metadata (e.g. projects and 
environments information).
-export HOP_CONFIG_FOLDER="${CATALINA_HOME}/webapps/ROOT/config"
+HOP_AUDIT_FOLDER="${CATALINA_HOME}/webapps/ROOT/audit"
 # specify the hop log level
-export HOP_LOG_LEVEL="Basic"
-# any additional JRE settings you want to pass on
-#export HOP_OPTIONS=
-# default Hop password encoder plugin
-export HOP_PASSWORD_ENCODER_PLUGIN="Hop"
-# point Hop to the plugins folder
-export HOP_PLUGIN_BASE_FOLDERS="${CATALINA_HOME}/plugins"
-# path to jdbc drivers
-export HOP_SHARED_JDBC_FOLDERS="${CATALINA_HOME}/jdbc-drivers"
-
-# Set TOMCAT start variables
-# Note: Use double quotes so shell variables are expanded before being passed 
to JVM
-export CATALINA_OPTS="${HOP_OPTIONS} 
-DHOP_AES_ENCODER_KEY=\"${HOP_AES_ENCODER_KEY}\" 
-DHOP_AUDIT_FOLDER=\"${HOP_AUDIT_FOLDER}\" 
-DHOP_CONFIG_FOLDER=\"${HOP_CONFIG_FOLDER}\" 
-DHOP_LOG_LEVEL=\"${HOP_LOG_LEVEL}\" 
-DHOP_PASSWORD_ENCODER_PLUGIN=\"${HOP_PASSWORD_ENCODER_PLUGIN}\" 
-DHOP_PLUGIN_BASE_FOLDERS=\"${HOP_PLUGIN_BASE_FOLDERS}\" 
-DHOP_SHARED_JDBC_FOLDERS=\"${HOP_SHARED_JDBC_FOLDERS}\""
-
-----
-
-=== Project settings
-
-If you want to run Hop Web with the `default` and `samples` projects, make 
sure the project root path in `hop-config.json` is set to 
`+${HOP_CONFIG_FOLDER}+`.
-
-On Linux, use the following sed command to fix this in one line:
-
-`+sed -i 's/config\/projects/${HOP_CONFIG_FOLDER}\/projects/g' 
${CATALINA_HOME}/webapps/ROOT/config/hop-config.json+`
+HOP_LOG_LEVEL="Basic"
 
-On macOS, use (note the empty string '' after -i):
-
-`+sed -i '' 's/config\/projects/${HOP_CONFIG_FOLDER}\/projects/g' 
${CATALINA_HOME}/webapps/ROOT/config/hop-config.json+`
-
-On Windows, modify `hop-config.json` to make sure `projectsConf` looks like 
the one below:
-
-[source, json]
-----
-  "projectsConfig" : {
-    "enabled" : true,
-    "projectMandatory" : true,
-    "defaultProject" : "default",
-    "standardParentProject" : "default",
-    "projectConfigurations" : [ {
-      "projectName" : "default",
-      "projectHome" : "${HOP_CONFIG_FOLDER}/projects/default",
-      "configFilename" : "project-config.json"
-    }, {
-      "projectName" : "samples",
-      "projectHome" : "${HOP_CONFIG_FOLDER}/projects/samples",
-      "configFilename" : "project-config.json"
-    } ]
-  }
-
-----
-
-
-=== Script classpaths 
-
-To make sure all hop scripts are accessible and work correctly with Hop Web, 
update their classpaths: 
-
-This can be done with a couple of `sed` commands. On Linux:
-
-[source, bash]
-----
-sed -i 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' 
${CATALINA_HOME}/webapps/ROOT/hop-run.sh
-sed -i 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' 
${CATALINA_HOME}/webapps/ROOT/hop-conf.sh
-sed -i 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' 
${CATALINA_HOME}/webapps/ROOT/hop-search.sh
-sed -i 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' 
${CATALINA_HOME}/webapps/ROOT/hop-encrypt.sh
-sed -i 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' 
${CATALINA_HOME}/webapps/ROOT/hop-import.sh
-----
-
-On macOS, use (note the empty string '' after -i):
-
-[source, bash]
+CATALINA_OPTS="${CATALINA_OPTS} -DHOP_AUDIT_FOLDER=${HOP_AUDIT_FOLDER} 
-DHOP_LOG_LEVEL=${HOP_LOG_LEVEL}"
 ----
-sed -i '' 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' 
${CATALINA_HOME}/webapps/ROOT/hop-run.sh
-sed -i '' 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' 
${CATALINA_HOME}/webapps/ROOT/hop-conf.sh
-sed -i '' 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' 
${CATALINA_HOME}/webapps/ROOT/hop-search.sh
-sed -i '' 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' 
${CATALINA_HOME}/webapps/ROOT/hop-encrypt.sh
-sed -i '' 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' 
${CATALINA_HOME}/webapps/ROOT/hop-import.sh
-----
-
-The `CLASSPATH` lines in the various scripts should look similar to the one 
below after editing: 
-
-`CLASSPATH="../../lib/*:WEB-INF/lib/*:lib/core/**:lib/swt/osx/arm64/*"`
-
-Once the classpaths have been updated, make sure to make the scripts 
executable: 
-
-`+chmod +x ${CATALINA_HOME}/webapps/ROOT/*.sh+`
 
+The user manual lists the folder settings and their defaults.
 
 === Start Tomcat
 
@@ -245,9 +128,8 @@ image:hop-web.png[Hop Web, width="90%"]
 
 === ClassNotFoundException or missing libraries
 
-* **Verify libraries copied**: `ls $CATALINA_HOME/webapps/ROOT/WEB-INF/lib/ | 
wc -l` (should show 100+ files)
-* **Check core/beam libraries**: Ensure Step 4 and Step 5 completed 
successfully
-* **Verify script classpaths**: Check that sed commands updated the CLASSPATH 
in scripts
+* **Verify the war was unpacked**: `ls 
$CATALINA_HOME/webapps/ROOT/WEB-INF/lib/ | wc -l` (should show 100+ files)
+* **Check the plugins folder**: `$CATALINA_HOME/plugins` should exist, or 
`HOP_PLUGIN_BASE_FOLDERS` should point to one
 
 === Hop Web shows 404 or blank page
 
@@ -257,18 +139,17 @@ image:hop-web.png[Hop Web, width="90%"]
 
 === RCP or SWT-related errors
 
-* **Remove RCP jar**: Ensure Step 4b removed `hop-ui-rcp-*.jar`
-* **Verify removal**: `ls $CATALINA_HOME/webapps/ROOT/WEB-INF/lib/*rcp*` 
(should show nothing)
+* **No RCP jar**: `ls $CATALINA_HOME/webapps/ROOT/WEB-INF/lib/*rcp*` should 
show nothing. The war leaves `hop-ui-rcp` out; a jar copied in by hand brings 
the error back.
 
-=== Environment variables not working
+=== Settings not picked up
 
-* **Check startup.sh**: Verify variables were added before the `exec` line
-* **Verify syntax**: `grep HOP_CONFIG_FOLDER $CATALINA_HOME/bin/startup.sh`
-* **Restart Tomcat**: Always restart after modifying `startup.sh`
+* **Check setenv.sh**: `grep HOP_ $CATALINA_HOME/bin/setenv.sh`
+* **Check the log**: at startup Hop Web logs each folder it chose itself, for 
example `HOP_PLUGIN_BASE_FOLDERS=... (default)`
+* **Restart Tomcat**: Always restart after modifying `setenv.sh`
 
 === Projects not found
 
-* **Check hop-config.json**: Verify paths were updated with sed command
+* **Check hop-config.json**: the project paths should start with 
`+${HOP_CONFIG_FOLDER}+`
 * **Verify variable substitution**: `grep HOP_CONFIG_FOLDER 
$CATALINA_HOME/webapps/ROOT/config/hop-config.json`
 * **Check project directories**: `ls 
$CATALINA_HOME/webapps/ROOT/config/projects/`
 
diff --git a/docs/hop-user-manual/modules/ROOT/pages/hop-gui/hop-web.adoc 
b/docs/hop-user-manual/modules/ROOT/pages/hop-gui/hop-web.adoc
index 5296786de4..48e641b46b 100644
--- a/docs/hop-user-manual/modules/ROOT/pages/hop-gui/hop-web.adoc
+++ b/docs/hop-user-manual/modules/ROOT/pages/hop-gui/hop-web.adoc
@@ -50,6 +50,92 @@ You'll feel right at home!
 
 image:hop-web.png[Hop Web,width="90%"]
 
+[[hop-web-tomcat]]
+== Running Hop Web on your own Tomcat
+
+Each release publishes Hop Web for a servlet container to Maven Central, as 
`org.apache.hop:hop-web`:
+
+[cols="1,3"]
+|===
+|File |Contents
+
+|`hop-web-<version>.war`
+|The web application: Hop with its libraries, the configuration folder with 
the `default` and `samples` projects, and the Hop tools (`hop-conf.sh`, 
`hop-run.sh` and the others).
+
+|`hop-web-<version>-plugins.zip`
+|The `plugins` and `jdbc-drivers` folders, and Hop's license files in 
`hop-licenses`.
+|===
+
+Both are at `https://repo1.maven.org/maven2/org/apache/hop/hop-web/<version>/`.
+A Hop build leaves them in `assemblies/web-war/target`.
+
+You need Java {java-version} and Tomcat 10.1 or later.
+
+. Copy the war to `$CATALINA_BASE/webapps/ROOT.war`.
+Hop Web has to be the `ROOT` web application: the interface is at `/ui`, and 
the Hop tools look for Tomcat's libraries in `../../lib`.
+. Unzip the plugins zip into `$CATALINA_BASE`. That creates 
`$CATALINA_BASE/plugins` and `$CATALINA_BASE/jdbc-drivers`.
+. Start Tomcat and open http://localhost:8080/ui.
+
+[source,bash]
+----
+cp hop-web-<version>.war "$CATALINA_BASE/webapps/ROOT.war"
+unzip hop-web-<version>-plugins.zip -d "$CATALINA_BASE"
+"$CATALINA_HOME/bin/startup.sh"
+----
+
+Tomcat has to unpack the war, which it does by default (`unpackWARs="true"` on 
the `Host`): Hop reads its configuration and runs its tools from the web 
application folder.
+
+The xref:hop-tools/index.adoc[Hop tools] are in `$CATALINA_BASE/webapps/ROOT`.
+Tomcat does not keep file permissions when it unpacks a war, so make them 
executable once after each deployment:
+
+[source,bash]
+----
+chmod +x "$CATALINA_BASE"/webapps/ROOT/hop "$CATALINA_BASE"/webapps/ROOT/*.sh
+----
+
+The tools use the same folders as Hop Web: `config` in the web application, 
`plugins` and `jdbc-drivers` two levels up.
+
+=== Folders
+
+Without further settings, Hop Web uses these folders:
+
+[cols="1,2"]
+|===
+|Setting |Default
+
+|`HOP_CONFIG_FOLDER`
+|`$CATALINA_BASE/webapps/ROOT/config`
+
+|`HOP_PLUGIN_BASE_FOLDERS`
+|`$CATALINA_BASE/plugins`
+
+|`HOP_SHARED_JDBC_FOLDERS`
+|`$CATALINA_BASE/jdbc-drivers`
+|===
+
+To use another folder, set a Java system property or an environment variable 
with the same name, for example in `$CATALINA_BASE/bin/setenv.sh`.
+A system property wins over an environment variable.
+`HOP_PLUGIN_BASE_FOLDERS` and `HOP_SHARED_JDBC_FOLDERS` take a comma-separated 
list, so you can add your own folders next to the default ones.
+
+Tomcat replaces `webapps/ROOT` when you deploy a new war, and the 
configuration folder with it.
+Set `HOP_CONFIG_FOLDER` to a folder outside Tomcat for anything you want to 
keep, and copy `webapps/ROOT/config` there first: its `hop-config.json` 
registers the `default` and `samples` projects under 
`+${HOP_CONFIG_FOLDER}/projects+`.
+
+The other settings of the `apache/hop-web` image work the same way, for 
example `HOP_AUDIT_FOLDER`, `HOP_AES_ENCODER_KEY`, `HOP_LOG_LEVEL` and 
`HOP_PASSWORD_ENCODER_PLUGIN`:
+
+[source,bash]
+----
+# $CATALINA_BASE/bin/setenv.sh
+CATALINA_OPTS="$CATALINA_OPTS -DHOP_CONFIG_FOLDER=/srv/hop/config 
-DHOP_AUDIT_FOLDER=/srv/hop/audit"
+----
+
+=== Marketplace plugins and fonts
+
+The plugins zip has the same plugins as the Hop client.
+To add a marketplace plugin, unzip its zip into a scratch folder, copy its 
`plugins` folder into `$CATALINA_BASE/plugins` and the jars in its `lib/core` 
folder, if it has one, into `webapps/ROOT/WEB-INF/lib`.
+
+Hop Web draws the pipeline and workflow canvas on the server.
+Install a font with Chinese, Japanese and Korean characters on the server, 
such as Noto CJK, if names use those scripts; without one they are measured and 
laid out too narrow.
+
 == Working with server files and browser files
 
 The *File* menu opens and saves files on the Hop server or its configured 
virtual file systems.
@@ -155,7 +241,7 @@ Hop Web talks to the browser in JSON, and the pipeline 
canvas and the transform
 gzip shrinks these responses four to five times, which keeps the interface 
responsive on slower links.
 
 The `apache/hop-web` image enables compression on its Tomcat connector; its 
`conf/server.xml` is `docker/resources/server.xml` in the Hop source tree.
-If you deploy `hop.war` on your own Tomcat, add it to the HTTP connector in 
`conf/server.xml`; `image/svg+xml` is not in Tomcat's default list:
+If you deploy Hop Web on your own Tomcat (see <<hop-web-tomcat>>), add it to 
the HTTP connector in `conf/server.xml`; `image/svg+xml` is not in Tomcat's 
default list:
 
 [source,xml]
 ----
diff --git a/rap/src/main/java/org/apache/hop/ui/hopgui/HopWebDefaults.java 
b/rap/src/main/java/org/apache/hop/ui/hopgui/HopWebDefaults.java
new file mode 100644
index 0000000000..5846a3d84f
--- /dev/null
+++ b/rap/src/main/java/org/apache/hop/ui/hopgui/HopWebDefaults.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hop.ui.hopgui;
+
+import jakarta.servlet.ServletContext;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.function.UnaryOperator;
+
+/**
+ * Default folders for Hop Web deployed as a war in a servlet container, so 
the hop-web war runs
+ * without any HOP_* settings:
+ *
+ * <ul>
+ *   <li>HOP_CONFIG_FOLDER: the web app's {@code config} folder
+ *   <li>HOP_PLUGIN_BASE_FOLDERS: {@code CATALINA_BASE/plugins}
+ *   <li>HOP_SHARED_JDBC_FOLDERS: {@code CATALINA_BASE/jdbc-drivers}
+ * </ul>
+ *
+ * <p>A folder is only used when it exists. A system property always wins; an 
environment variable
+ * of the same name is copied to the system property, because Hop only reads 
system properties here.
+ *
+ * <p>This runs before Hop is initialized, so it must not touch {@code Const}: 
its {@code
+ * HOP_CONFIG_FOLDER} is computed once, when the class loads. For the same 
reason it uses plain file
+ * system paths rather than Hop VFS.
+ */
+public final class HopWebDefaults {
+
+  static final String HOP_CONFIG_FOLDER = "HOP_CONFIG_FOLDER";
+  static final String HOP_PLUGIN_BASE_FOLDERS = "HOP_PLUGIN_BASE_FOLDERS";
+  static final String HOP_SHARED_JDBC_FOLDERS = "HOP_SHARED_JDBC_FOLDERS";
+
+  private HopWebDefaults() {}
+
+  /**
+   * Applies the defaults for the given web app.
+   *
+   * @return one line per setting that was set here, to be logged
+   */
+  public static List<String> apply(ServletContext servletContext) {
+    return apply(
+        servletContext.getRealPath("/"), System.getProperty("catalina.base"), 
System::getenv);
+  }
+
+  static List<String> apply(
+      String webAppFolder, String catalinaBase, UnaryOperator<String> 
environment) {
+    List<String> applied = new ArrayList<>();
+    setDefault(applied, HOP_CONFIG_FOLDER, environment, folder(webAppFolder, 
"config"));
+    setDefault(applied, HOP_PLUGIN_BASE_FOLDERS, environment, 
folder(catalinaBase, "plugins"));
+    setDefault(applied, HOP_SHARED_JDBC_FOLDERS, environment, 
folder(catalinaBase, "jdbc-drivers"));
+    return applied;
+  }
+
+  private static Path folder(String parent, String name) {
+    if (isEmpty(parent)) {
+      return null;
+    }
+    Path folder = Path.of(parent, name);
+    return Files.isDirectory(folder) ? folder : null;
+  }
+
+  private static void setDefault(
+      List<String> applied, String name, UnaryOperator<String> environment, 
Path fallback) {
+    if (!isEmpty(System.getProperty(name))) {
+      return;
+    }
+    String fromEnvironment = environment.apply(name);
+    if (!isEmpty(fromEnvironment)) {
+      System.setProperty(name, fromEnvironment);
+      applied.add(name + "=" + fromEnvironment + " (environment variable)");
+    } else if (fallback != null) {
+      System.setProperty(name, fallback.toString());
+      applied.add(name + "=" + fallback + " (default)");
+    }
+  }
+
+  private static boolean isEmpty(String value) {
+    return value == null || value.isBlank();
+  }
+}
diff --git 
a/rap/src/main/java/org/apache/hop/ui/hopgui/HopWebServletContextListener.java 
b/rap/src/main/java/org/apache/hop/ui/hopgui/HopWebServletContextListener.java
index cd42cb5e0e..5ac2cf494c 100644
--- 
a/rap/src/main/java/org/apache/hop/ui/hopgui/HopWebServletContextListener.java
+++ 
b/rap/src/main/java/org/apache/hop/ui/hopgui/HopWebServletContextListener.java
@@ -36,6 +36,11 @@ public class HopWebServletContextListener extends 
RWTServletContextListener {
   @SuppressWarnings("java:S4507")
   @Override
   public void contextInitialized(ServletContextEvent event) {
+    // Before anything loads Const: it reads HOP_CONFIG_FOLDER once, when the 
class loads.
+    for (String applied : HopWebDefaults.apply(event.getServletContext())) {
+      logger.info(applied);
+    }
+
     /*
      *  The following lines are from HopGui.main
      *  because they are application-wide context.
diff --git a/rap/src/test/java/org/apache/hop/ui/hopgui/HopWebDefaultsTest.java 
b/rap/src/test/java/org/apache/hop/ui/hopgui/HopWebDefaultsTest.java
new file mode 100644
index 0000000000..147af82bb4
--- /dev/null
+++ b/rap/src/test/java/org/apache/hop/ui/hopgui/HopWebDefaultsTest.java
@@ -0,0 +1,137 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hop.ui.hopgui;
+
+import static org.apache.hop.ui.hopgui.HopWebDefaults.HOP_CONFIG_FOLDER;
+import static org.apache.hop.ui.hopgui.HopWebDefaults.HOP_PLUGIN_BASE_FOLDERS;
+import static org.apache.hop.ui.hopgui.HopWebDefaults.HOP_SHARED_JDBC_FOLDERS;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
+
+class HopWebDefaultsTest {
+
+  private static final List<String> NAMES =
+      List.of(HOP_CONFIG_FOLDER, HOP_PLUGIN_BASE_FOLDERS, 
HOP_SHARED_JDBC_FOLDERS);
+
+  @TempDir Path catalinaBase;
+
+  private final Map<String, String> saved = new HashMap<>();
+  private final Map<String, String> environment = new HashMap<>();
+  private Path webApp;
+
+  @BeforeEach
+  void setUp() throws Exception {
+    for (String name : NAMES) {
+      saved.put(name, System.getProperty(name));
+      System.clearProperty(name);
+    }
+    webApp = Files.createDirectories(catalinaBase.resolve("webapps/ROOT"));
+  }
+
+  @AfterEach
+  void tearDown() {
+    for (String name : NAMES) {
+      String value = saved.get(name);
+      if (value == null) {
+        System.clearProperty(name);
+      } else {
+        System.setProperty(name, value);
+      }
+    }
+  }
+
+  private List<String> apply() {
+    return HopWebDefaults.apply(webApp.toString(), catalinaBase.toString(), 
environment::get);
+  }
+
+  @Test
+  void usesTheFoldersOfTheTomcatLayout() throws Exception {
+    Path config = Files.createDirectories(webApp.resolve("config"));
+    Path plugins = Files.createDirectories(catalinaBase.resolve("plugins"));
+    Path jdbc = Files.createDirectories(catalinaBase.resolve("jdbc-drivers"));
+
+    List<String> applied = apply();
+
+    assertEquals(config.toString(), System.getProperty(HOP_CONFIG_FOLDER));
+    assertEquals(plugins.toString(), 
System.getProperty(HOP_PLUGIN_BASE_FOLDERS));
+    assertEquals(jdbc.toString(), System.getProperty(HOP_SHARED_JDBC_FOLDERS));
+    assertEquals(3, applied.size());
+  }
+
+  @Test
+  void leavesMissingFoldersUnset() {
+    assertTrue(apply().isEmpty());
+    for (String name : NAMES) {
+      assertNull(System.getProperty(name), name);
+    }
+  }
+
+  @Test
+  void systemPropertyWins() throws Exception {
+    Files.createDirectories(catalinaBase.resolve("plugins"));
+    System.setProperty(HOP_PLUGIN_BASE_FOLDERS, "/opt/my-plugins");
+    environment.put(HOP_PLUGIN_BASE_FOLDERS, "/from/environment");
+
+    apply();
+
+    assertEquals("/opt/my-plugins", 
System.getProperty(HOP_PLUGIN_BASE_FOLDERS));
+  }
+
+  @Test
+  void environmentVariableBeatsTheDefault() throws Exception {
+    Files.createDirectories(catalinaBase.resolve("jdbc-drivers"));
+    environment.put(HOP_SHARED_JDBC_FOLDERS, "/opt/drivers");
+
+    apply();
+
+    assertEquals("/opt/drivers", System.getProperty(HOP_SHARED_JDBC_FOLDERS));
+  }
+
+  @Test
+  void blankSystemPropertyCountsAsUnset() throws Exception {
+    // The image passes 
-DHOP_PLUGIN_BASE_FOLDERS="${HOP_PLUGIN_BASE_FOLDERS}", which is empty
+    // when the variable is.
+    Path plugins = Files.createDirectories(catalinaBase.resolve("plugins"));
+    System.setProperty(HOP_PLUGIN_BASE_FOLDERS, "");
+
+    apply();
+
+    assertEquals(plugins.toString(), 
System.getProperty(HOP_PLUGIN_BASE_FOLDERS));
+  }
+
+  @Test
+  void worksWithoutCatalinaBase() throws Exception {
+    Path config = Files.createDirectories(webApp.resolve("config"));
+
+    HopWebDefaults.apply(webApp.toString(), null, environment::get);
+
+    assertEquals(config.toString(), System.getProperty(HOP_CONFIG_FOLDER));
+    assertNull(System.getProperty(HOP_PLUGIN_BASE_FOLDERS));
+  }
+}
diff --git a/tools/check-assembly-size.sh b/tools/check-assembly-size.sh
index b6072a4e9b..fdd6baa35e 100755
--- a/tools/check-assembly-size.sh
+++ b/tools/check-assembly-size.sh
@@ -49,6 +49,9 @@ for f in 
"$ROOT"/assemblies/plugins/target/hop-assemblies-plugins-*.zip; do
   # plugins aggregate should also stay under the limit
   check "hop-assemblies-plugins" "$f"
 done
+for f in "$ROOT"/assemblies/web-war/target/hop-web-*.war 
"$ROOT"/assemblies/web-war/target/hop-web-*-plugins.zip; do
+  check "hop-web" "$f"
+done
 
 if (( FAILED )); then
   echo "Assembly size check failed (limit ${MAX_BYTES} bytes)."

Reply via email to