Startup options
Commandline
Start scripts webswing.bat
and webswing.sh
are included in Webswing distribution. These scripts may need to be adapted to point to the right Java installation and to configure other custom options.
Starting Webswing with option -h
will print out help with list of all possible option.
c:\webswing>java -jar webswing-server.war -h
You can define the following options in start scripts:
Option | Description | Default value |
---|---|---|
-c |
Configuration file name. | <webswing-server.war path>/webswing.config |
-d |
Create new temp folder for every Webswing instance | false |
-h |
Local interface address where the web server will listen. | localhost |
-j |
Jetty startup configuration file. | ./jetty.properties |
-kp |
Keystore password. | |
-ks |
Keystore file location for ssl configuration | |
-p |
HTTP port where the web server will listen. If 0 HTTP is disable | 8080 |
-s |
HTTPS port where the web server will listen.If 0 HTTP is disabled. | 0 |
-t |
The folder where temp folder will be created for the Webswing server | ./tmp |
-tc |
Clean the temp folder before Webswing start | true |
-tp |
Truststore password | |
-ts |
Truststore file location for SSL configuration |
SSL configuration
There is a special configuration file for the built-in jetty called jetty.properties
. It is used to configure connection options of the server like ports, protocols, SSL certificates and CORS origins (for embedded Webswing ). Command-line options have higher priority than this file. Location of this file can be specified by option -j
. You can configure following options in this file:
org.webswing.server.host=localhost
org.webswing.server.http=true
org.webswing.server.http.port=8080
org.webswing.server.https=true
org.webswing.server.https.port=8443
org.webswing.server.https.truststore=ssl/truststore.jks
org.webswing.server.https.truststore.password=OBF:18xp18xr18xt18xp18xr18xt
org.webswing.server.https.keystore=ssl/keystore.jks
org.webswing.server.https.keystore.password=OBF:18xp18xr18xt18xp18xr18xt
To obfuscate the trustore and keystore password Jetty can generate the obfuscated password that can be used in the property file aftwerwards.
Usage:
>java -cp jetty-util-9.4.18.v20190429.jar org.eclipse.jetty.util.security.Password 123123
2019-08-26 12:26:43.711:INFO::main: Logging initialized @140ms to org.eclipse.jetty.util.log.StdErrLog
123123
OBF:18xp18xr18xt18xp18xr18xt
MD5:4297f44b13955235245b2497399d7a93
Afterwards use the obfuscated password in the jetty.properties file. For more details visit Official Jetty Documentation