Skip to content
Jenkins extras: executable-war
Branch: master
Clone or download
oleg-nenashev Merge pull request #23 from jsoref/JENKINS-58058
[JENKINS-58058] Fix minor code issues reported by SpotBugs
Latest commit 2af9467 Jul 8, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
src [JENKINS-58058] SpotBugs: DLS_DEAD_LOCAL_STORE Jun 17, 2019
.gitignore Changelog: noting 1.45 Feb 7, 2019

Executable WAR header

This module defines the 'main' method for a self-contained web application that kickstarts embedded Winstone and runs a web application without needing a servlet container.

See Jenkins war module for how this module gets used by a .war file.


This section describes particular use-cases of the executable WAR.

Jetty Session IDs

The Executable WAR library has a custom handling of Jetty Session IDs by default. In particular, by default it uses custom cookie names in order to prevent session collisions when running multiple Jenkins instances on the same host. Every startup the wrapper picks a new random cookie name (format: JSESSIONID.${* random hex symbols}). The default lifetime of these cookies is 1 day, hence in some cases you may get into issues like JENKINS-25046 (too many active cookies) when you restart Jenkins too often or use multiple instances.

Starting from version 1.36, it is possible to customize the behavior via System Properties:

  • executableWar.jetty.disableCustomSessionIdCookieName - (boolean, default: false) -
    Disables usage of the custom cookie names when starting the WAR file. If the flag is specified, the session ID will be defined by the internal Jetty logic. In such case it becomes configurable via Jetty configuration (XML config file, etc.).
  • executableWar.jetty.sessionIdCookieName - (string, default: null) -
    Sets a custom Session ID Cookie name when disableCustomSessionIdCookieName is false. In such case the Jenkins administrator is responsible for preventing cookie collisions between Jenkins instances.

Parameters from stdin

When parameters are passed via command line they can be viewed using ps in *nix, process explorer in Windows as long as the process keeps running. This is undesirable when passing sensitive parameters like httpsKeyStorePassword.

It is now possible to pass parameters through stdin. To do this pass '--paramsFromStdIn' parameter and you will be able to replace this: java -jar jenkins.war --httpPort=-1 --httpsPort=443 --httpsKeyStore=path/to/keystore --httpsKeyStorePassword=keystorePassword with this: echo "--httpPort=-1 --httpsPort=443 --httpsKeyStore=path/to/keystore --httpsKeyStorePassword=keystorePassword" | java -jar jenkins.war --paramsFromStdIn

You can’t perform that action at this time.