5.3. Deploy using a HTTP POST call

The DAR file can be deployed programmatic sending a POST method to the servent or using a HTML file with multipart/form-data encode type. The ServiceFactory will use the programmatic method but we can use the more easy HTML file for our examples[1].

Because the servent is still very bound to the DBE, if this method is used, one more parameter is needed in the deployment.props file. This parameter is named smid and this will be the service identifier (a number o small word).

As a result of the deployment, a new directory will be create in the Servent deployment directory. The name of the directory will be the smid value. The DAR file will be decompressed in this directory.

Deployment HTML file

<h1>Deployment</h1>

  <form action="http://<servent_ip>:<private_port>/DBE/upload"

    method="post" enctype="multipart/form-data">

  <input type="file" name="file">

  <input type="submit" value="go!">

</form>

You need to change the <servent_ip> and <private_port> with the real servent values.

Notes

[1]

This file is already included in the servent release (deploy.html) but it will be changed in short to be part of the servent automatically.