Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
{panel:title=In this chapter|borderStyle=solid|titleBGColor=orange}{toc}{panel} Using the Servoy Smart Client, solutions developed in Servoy can be distributed to end users. h4. Characteristics of a Smart Client - Installs automatically on initial launch - Automatically updates when a new version of either the Solution of the Smart Client itself is available - Native application - Executes business logic locally - Can interact with the local file system - Can interact with local appliances connected to the client machine - Is connected to the Servoy Application Server to utilize services provided by the Application Server While running, the Smart Client is connected to the Application Server to utilize the services provided by the Application Server, like database connectivity, datachange broadcasting, emailing and reporting for example Servoy Smart Clients are launched and distributed from the Servoy Application Server using [Java Web Start Technology|http://java.sun.com/javase/technologies/desktop/javawebstart/index.jsp]. h4. Prerequisites {include:_smartClientRequirements} *Network settings* In order to be able to start and run Smart Clients the Application Server needs to be properly reachable from the machine on which the Smart client is to be started. Depending on the network route from the client machine to the server, different configuration might need to be applied. See [Network Settings] for more information. *Java Standard Edition Runtime Environment, including Java Web Start* A Smart Client requires Java Standard Edition Runtime Environment (JRE) to operate and Java Web Start to launch. Java Web Start is included in JRE. On most machines, a JRE installation will be present by default. The Application Server hosts a webpage that can be used to check if a valid JRE is installed on the cllient machine and if not, to automatically install it. This page can be accessed in the browser through the following url: <serverUrl>/autoinstallvm.html. The JRE can also be manually downloaded and installed. See [Java runtime] for more information. h4. Installing Smart Clients Smart Clients install themselves on first launch. On first launch, the Java Web Start process will install the Smart Client in a cache on the client machine. On subsequent starts, the Java Web Start mechanism will check to see if the application is already cached and will start from the cache if available. On start, it will validate the version in the cache with the version available on the Application Server and will automatically update if a new version is available. Smart Client launch by accessing the relevant URL on the Application Server (see [#Starting Smart Clients]). All required libraries will be automatically downloaded and locally cached by the Java Web Start process. The started solution will be cached by the Smart Client in the [Servoy cache|#Smart Client footprint]. *Desktop integration* The Smart Client can automatically integrate with the desktop of the client machine. Whether or not this happens depends on both client-side settings in the Java environment as well as server-side settings on the Application Server. See [#Java settings] for more information on the client-side Java settings and [Smart Client Settings] for more information on the Application Server settings. h4. Starting Smart Clients[#Solution browsing] By default, the Servoy Application Server comes with a web page for starting Smart Clients, located at <serverUrl>/index.html. This web page also provides a link to check if a Java Standard Edition Runtime Environment is installed. Servoy Smart Client can also be started by accessing a URL on the Servoy Application Server. Depending on the configuration of the Servoy Application Server, an icon might be placed on the users desktop to start the application thereafter.&nbsp; || Deeplink URL || What is does || Comment || |
Wiki Markup
Panel
titleBGColororange
titleIn this chapter
borderStylesolid
Table of Contents

Using the Servoy Smart Client, solutions developed in Servoy can be distributed to end users.

Characteristics of a Smart Client

  • Installs automatically on initial launch
  • Automatically updates when a new version of either the Solution of the Smart Client itself is available
  • Native application
  • Executes business logic locally
  • Can interact with the local file system
  • Can interact with local appliances connected to the client machine
  • Is connected to the Servoy Application Server to utilize services provided by the Application Server

While running, the Smart Client is connected to the Application Server to utilize the services provided by the Application Server, like database connectivity, datachange broadcasting, emailing and reporting for example

Servoy Smart Clients are launched and distributed from the Servoy Application Server using Java Web Start Technology.

Prerequisites

Include Page
DOCS:_smartClientRequirements
DOCS:_smartClientRequirements

Network settings
In order to be able to start and run Smart Clients the Application Server needs to be properly reachable from the machine on which the Smart client is to be started. Depending on the network route from the client machine to the server, different configuration might need to be applied. See Network Settings for more information.

Java Standard Edition Runtime Environment, including Java Web Start
A Smart Client requires Java Standard Edition Runtime Environment (JRE) to operate and Java Web Start to launch. Java Web Start is included in JRE. On most machines, a JRE installation will be present by default.

The Application Server hosts a webpage that can be used to check if a valid JRE is installed on the cllient machine and if not, to automatically install it. This page can be accessed in the browser through the following url: <serverUrl>/autoinstallvm.html.

The JRE can also be manually downloaded and installed. See Java runtime for more information.

Installing Smart Clients

Smart Clients install themselves on first launch. On first launch, the Java Web Start process will install the Smart Client in a cache on the client machine. On subsequent starts, the Java Web Start mechanism will check to see if the application is already cached and will start from the cache if available.

On start, it will validate the version in the cache with the version available on the Application Server and will automatically update if a new version is available.

Smart Client launch by accessing the relevant URL on the Application Server (see #Starting Smart Clients). All required libraries will be automatically downloaded and locally cached by the Java Web Start process. The started solution will be cached by the Smart Client in the Servoy cache.

Desktop integration
The Smart Client can automatically integrate with the desktop of the client machine. Whether or not this happens depends on both client-side settings in the Java environment as well as server-side settings on the Application Server. See #Java settings for more information on the client-side Java settings and Smart Client Settings for more information on the Application Server settings.

Starting Smart Clients#Solution browsing

By default, the Servoy Application Server comes with a web page for starting Smart Clients, located at <serverUrl>/index.html. This web page also provides a link to check if a Java Standard Edition Runtime Environment is installed.

Servoy Smart Client can also be started by accessing a URL on the Servoy Application Server. Depending on the configuration of the Servoy Application Server, an icon might be placed on the users desktop to start the application thereafter. 

Deeplink URL

What is does

Comment

{serverUrl}/servoy-client/servoy_client.jnlp

...

Opens

...

a

...

Smart

...

Client

...

and

...

shows

...

the

...

"Select

...

Solution"

...

dialog

...

"Select

...

Solution"

...

dialog

...

will

...

not

...

be

...

displayed

...

if

...

solution

...

browsing

...

is

...

disabled,

...

see #Solution browsing

{serverUrl}/servoy-client/{mySolutionName

...

}.jnlp

Opens a Smart Client and launches the specified solution

 

{serverUrl}/servoy-client/mySolutionName.jnlp?

...

a={value}

Opens a Smart Client and launches the specified solution. The argument value is passed into the Solutions onOpen event handler

 

{serverUrl}/servoy-client/{mySolutionName}.jnlp?

...

m=myMethodName

Opens a Smart Client

 

 

 

{serverUrl}/servoy-client/mySolutionName.jnlp?m=myMethodName&a=value

...

 

{serverUrl}/servoy-client/mySolutionName.jnlp?a=value&name1=value1&name2=value2

...

 

 

{serverUrl}/servoy-client/mySolutionName.jnlp?m=myMethodName&a=value&name1=value1&name2=value2

...

 

 

Code Block
titleSolution Select Dialog
<serverUrl>/servoy-client/servoy_client.jnlp{code}
{code:title=Deeplink into specific solution}
Code Block
titleDeeplink into specific solution
<serverUrl>/servoy-client/mySolutionName.jnlp{code}
{code:title=Specify the method to execute on startup}
Code Block
titleSpecify the method to execute on startup
<serverUrl>/servoy-client/mySolutionName.jnlp?m=myMethodName{code}
{code:title=Specify startup arguments}
Code Block
titleSpecify startup arguments
<serverUrl>/servoy-client/mySolutionName.jnlp?a=value{code}
{code:title=Specify the method to execute & startup arguments}
Code Block
titleSpecify the method to execute & startup arguments
<serverUrl>/servoy-client/mySolutionName.jnlp?m=myMethodName&a=value{code}
{code:title=Specify the startup argument & named arguments}
Code Block
titleSpecify the startup argument & named arguments
<serverUrl>/servoy-client/mySolutionName.jnlp?a=value&name1=value1&name2=value2{code}
{code:title=Specify the method to execute, the startup argument & named arguments}
Code Block
titleSpecify the method to execute, the startup argument & named arguments
<serverUrl>/servoy-client/mySolutionName.jnlp?m=myMethodName&a=value&name1=value1&name2=value2{code}

{include:shorthandLinkSyntax}

h6. Solution browsing

}By default, when using the first option above to launch a Servoy Smart Client (or through the default web page for starting Smart Clients mentioned earlier), when the Smart Client is started, the user will be presented with a list of all available solutions. Through the [servoy.allowSolutionBrowsing|Solution Settings#servoy.allowSolutionBrowsing] option under [Solution Settings|Solution Settings]on the Admin page of the Application Server, this dialog can be disabled. When disabled, the deeplink options that specify the solution must be used.

h6. Profiles

The Application Server provides settings that influence the Smart Client behavior, for example in the area of how the Application Servoy and the Smart Client communicate. When one (group of) Smart Client(s) require different settings than the other one, the Application Server provided [Profiles]. Using Profiles, settings can be bundled under a named Profile. Smart Clients can connect to the Application Server using a particular profile by adding the Profile name to the URLs mentioned above. For example:
{code:title=Deeplink into specific solution using a named Profile}
Include Page
DOCS:shorthandLinkSyntax
DOCS:shorthandLinkSyntax

...

Solution browsing

...

}By default, when using the first option above to launch a Servoy Smart Client (or through the default web page for starting Smart Clients mentioned earlier), when the Smart Client is started, the user will be presented with a list of all available solutions. Through the servoy.allowSolutionBrowsing option under Solution Settingson the Admin page of the Application Server, this dialog can be disabled. When disabled, the deeplink options that specify the solution must be used.

...

Profiles

...

The Application Server provides settings that influence the Smart Client behavior, for example in the area of how the Application Servoy and the Smart Client communicate. When one (group of) Smart Client(s) require different settings than the other one, the Application Server provided Profiles. Using Profiles, settings can be bundled under a named Profile. Smart Clients can connect to the Application Server using a particular profile by adding the Profile name to the URLs mentioned above. For example:

Code Block
titleDeeplink into specific solution using a named Profile
<serverUrl>/servoy-client/<profileName>/mySolutionName.jnlp{code}

Profiles

...

can

...

be

...

used

...

in

...

all

...

the

...

above

...

mentioned

...

URL's

...

to

...

start

...

or

...

deeplink

...

to

...

Smart

...

Clients.

...

Profiles

...

can

...

also

...

contain

...

all

...

the

...

additional

...

arguments

...

that

...

can

...

be

...

specified

...

on

...

the above mentioned URLs, like solution, method, arguments, named arguments (name1,

...

name2

...

etc.).

...

Both

...

the

...

short

...

and

...

long

...

syntax

...

are

...

supported.

...

For

...

more

...

information

...

on

...

Profiles,

...

see

...

Profiles

...

.

...

Deeplinking

...

into

...

existing

...

Smart

...

Client

...

When

...

a

...

user

...

already

...

has

...

a

...

Smart

...

Client

...

open,

...

it's

...

possible

...

to

...

provide

...

the

...

user

...

with

...

a

...

URL

...

that

...

deeplinks

...

to

...

a

...

method

...

in

...

the

...

open

...

solution.

...

When

...

the

...

URL

...

is

...

opened,

...

it

...

will

...

access

...

the

...

Application

...

Server

...

and

...

the

...

Application

...

Server

...

then

...

contacts

...

the

...

existing

...

Smart

...

Client

...

and

...

executes

...

the

...

specified

...

method.

...

To

...

enable

...

deeplinking

...

into

...

existing

...

Smart

...

Clients,

...

the

...

servoy.allowExistingClientActivate

...

setting

...

on

...

the

...

Admin

...

page

...

needs

...

to

...

be

...

set

...

to

...

true.

...

When

...

set

...

to

...

true,

...

if

...

a

...

Smart

...

Client

...

is

...

already

...

opened

...

on

...

the

...

users

...

machine

...

and

...

from

...

that

...

machine

...

the

...

deeplink

...

url

...

is

...

called

...

that

...

specifies

...

a

...

deeplink

...

method,

...

instead

...

of

...

opening

...

a

...

new

...

Smart

...

Client,

...

the

...

method

...

is

...

invoked

...

inside

...

the

...

existing

...

Smart

...

Client.

...

Otherwise,

...

a

...

new

...

Smart

...

Client

...

is

...

started.

...

:=}
Note
title
?x=x

The

deeplinking

into

an

existing

Smart

Client

is

partly

based

on

cookies.

When

starting

the

Smart

Client

from,

for

example

a

desktop

shortcut,

while

deeplink

from

within

an

email

in

a

mail

client,

it

can

happen

that

the

first

deeplink

from

the

mail

client

opens

a

new

Smart

Client

anyway.

A

possible

workaround

for

this

is

added

'?x=x'

to

the

shortcut's

URL,

like

<serverUrl>/servoy-client/mySolutionName.jnlp?x=x

{note} h4. Smart Client settings -

Smart Client settings

  • Server-side

...

  • settings

...

  • Client-side

...

  • settings

...

Java

...

Settings

...

A

...

JRE

...

installation

...

can

...

be

...

configured

...

and

...

managed

...

through

...

the

...

Java

...

Control

...

Panel.

...

How

...

to

...

access

...

the

...

Java

...

Control

...

Panel

...

differs

...

per

...

(version

...

of)

...

Operating

...

System,

...

for

...

example:

...

  • Windows:

...

  • Start

...

  • >

...

  • Settings

...

  • >

...

  • Control

...

  • Panel

...

  • >

...

  • Java

...

  • OSX:

...

  • Applications

...

  • >

...

  • Utilities

...

  • >

...

  • Java

...

  • Preferences

...

  • Linux

...

  • (Ubuntu):

...

  • System

...

  • >

...

  • Preferences

...

  • >

...

  • Java

...

The

...

Java

...

Control

...

Panel

...

provides

...

functionality

...

to

...

manage

...

and

...

configure

...

a

...

JRE

...

installation

...

Proxy

...

settings

...

When

...

operating

...

behing

...

a

...

proxy,

...

the

...

Java

...

environment

...

can

...

be

...

configured

...

how

...

to

...

retrieve

...

the

...

proxy

...

settings,

...

see

...

the

...

Network

...

settings

...

of

...

the

...

Java

...

Control

...

Panel.

...

Java

...

console

...

The

...

Java

...

console

...

is

...

a

...

window

...

that

...

opens

...

when

...

a

...

Java

...

application

...

starts

...

and

...

to

...

which

...

logging/debugging

...

information

...

can

...

be

...

written

...

by

...

the

...

applications.

...

When

...

investigating

...

issues

...

in

...

a

...

Smart

...

Client,

...

enable

...

the

...

Java

...

console

...

to

...

view

...

what

...

logging/debugging

...

information

...

the

...

application

...

provides.

...

See

...

the

...

"Java

...

console"

...

settings

...

under

...

"Advanced"

...

in

...

the

...

Java

...

Control

...

Panel.

...

Troubleshooting

Problems with Smart Clients fall into different categories and can be caused by a number of different reasons. Below an overview per category, with investigation guidelines and possible solutions.

...

Smart Client starting issues

...

Smart Client starting issues can have different causes.

JScript errors when starting the Smart Client (Windows only)

Enable "direct connections" on under the Network Settings of the Java Console on the client machine

Accessing the .jnlp file doesn't start Java Web Start

Wiki Markup
This means that either Java Web Start is not (properly) installed (see \[#Prerequisites\]) or that the .jnlp extention is not assosiated with Java Web Start.

...

Java

...

Web

...

Start

...

error:

...

Problem

...

downloading

...

the

...

application

...

webstart

...

issue

...


raw=true

...

option

...

Enable

...

wire

...

logging

...


In

...

case

...

of

...

connection

...

issues

...

between

...

the

...

Smart

...

Client

...

and

...

the

...

Application

...

Server

...

and

...

all

...

Smart

...

Client

...

disconnection

...

issues

...

Smart

...

Clients

...

operate

...

connected

...

to

...

the

...

Application

...

Server.

...

When

...

the

...

connection

...

is

...

lost,

...

the

...

Smart

...

Client

...

will

...

automatically

...

try

...

to

...

reconnect.

...

When

...

reconnection

...

is

...

not

...

possible,

...

the

...

Smart

...

Client

...

will

...

automatically

...

provide

...

the

...

user

...

with

...

an

...

error

...

message

...

and

...

the

...

option

...

to

...

close

...

the

...

Smart

...

Client

...

or

...

to

...

continue

...

to

...

try

...

and

...

reconnect.

...

...

Smart Client crash issues

...

When a Smart Client quits unsuspectedly or hangs, the first thing to do it enable the Java console

...

Smart Client update issues

...

flush
remove app from java
remove temp internet files

...

Solution issues

...

Smart Client footprint

A Smart Client has a very small footprint on the client machine. For startup performance reasons, both the Smart Client libraries as well as the Servoy Solution binaries are cached.

Java Web Start cache
Contains the cached libraries for the Smart Client, beans & plugins. Location depends on the #Java Settings.

Servoy cache
Contains cached solutions, i18n-messages and client settings. Located in the .servoy directory in the user directory