- Add
orbeon.warandorbeon-embedding.war. - Run
docker compose up.
The embedding demo JSP reads:
ServletContext.getInitParameter("orbeon-forms-context")
The WAR’s WEB-INF/web.xml provides a default value (typically /orbeon).
To override it without modifying the WAR, we use a Tomcat <Parameter> in the
context descriptor:
runtime/war-tomcat/orbeon-embedding.xmlsets:name="orbeon-forms-context"value="https://orbeon.local:8081"override="false"so the WAR’s web.xml cannot replace it
Important Tomcat detail: conf/Catalina/localhost/orbeon.xml is a Tomcat
Context descriptor, not a web deployment descriptor. Tomcat does not apply
<filter> / <filter-mapping> from that file.
To configure CORS and session cookie settings without changing orbeon.war,
we inject a small WEB-INF/tomcat-web.xml into the Orbeon webapp:
runtime/war-tomcat/tomcat-web.xmlis mounted into the container at:/usr/local/tomcat/conf/tomcat-web.xmlruntime/war-tomcat/orbeon.xmlconfiguresStandardRoot+ aFileResourceSetto mount that file into the webapp at:/WEB-INF/tomcat-web.xml
Tomcat automatically processes /WEB-INF/tomcat-web.xml with higher precedence
than the global defaults in conf/web.xml, allowing us to add:
org.apache.catalina.filters.CorsFilter<session-config><cookie-config><secure>true</secure>...</cookie-config>so theJSESSIONIDcookie includesSecure
CORS headers are only added when the request includes an Origin header.
Example:
curl -I -H 'Origin: https://presenter.local:8081'
http://orbeon.local:8081/orbeon/fr/orbeon/bookshelf/new