logo
20.1
search
No matching documents found.
list
search
No matching documents found.
logo
Please be aware that there is newer version of documentation available for Webswing. Documentation 24.1

URL Params

Available URL parameters

When you start Webswing it will be available on http://localhost:8080. The page served on this URL (index.html) allows you to change some of the default behavior using URL parameters.

The following arguments are available by default:

Additional application arguments

Webswing provides a way to define more custom arguments as application startup variable. If URL parameter is specified in a form ?args=JSON then value of the JSON will be available in the configuration.

Example:

http://localhost:8080?args={"argument1":"value","argument2":{"nested":"value2"}"

Value of this JSON parameter will be available in ${customArgs} variable that can be used in webswing.config file ( i.e. "args": "${customArgs}"). This example results to variables:

  • ${customArgs}
  • ${customArgs.argument2.nested}
  • ${customArgs.argument1}

Applet parameters are added as “webswing-param” elements under the “div” tag.

Disable binary socket

http://localhost:8080?binarySocket=false : Binary socket is enabled by default. If you wish to use JSON for transferring data through websocket, set this option to false.

Session recording

http://localhost:8080?recording=true : if recording is enabled, Webswing will create a recording file in temp folder, which can be later used for replay of the application frame by frame, just like a movie.

Session playback

http://localhost:8080?recordingPlayback=path/to/recordingFile.wss : This option can be used to play the recording file. This option is internally used in Admin console for playback of finished sessions. Only users with an admin role are allowed to playback recordings.

Debugging

http://localhost:8080/swingset3?debugPort=8000 : See debugging guide.

Username in anonymous security

If you are not using Webswing Authentication (Security Module = NONE) you can pass the username as an URL argument and retrieve from API. Security module NONE has a special url argument securityToken=username like this: http://localhost:8080/swingset3/?securityToken=dummy

URL parameters can be combined together.

If your deployment has other specific requirements that are not achievable by this set of parameters, you can embed Webswing's JavaScript snippet to your own web page, where you have full control and ability to further customize the behavior.