Configuring the object by using URL-encoded data

This approach uses the HTTP Post protocol with the URL-encoded content type to deliver the annotation data in chunked data segments. Therefore, this approach is inherently more complex than the annotationSaveServlet approach.

About this task

You use the annotationSavePost parameter to specify the location of the POST object. The value of this parameter must be a URL that is relative to the codebase or is an absolute value.

You can add parameters such as user ID or document ID to the POST data by using the annotationPostPrefix parameter. IBM Daeja ViewONE tags on its own annotations data.

At save time, the annotations data is URL-encoded and put into a series of segments. Each segment can contain up to 64 KB of encoded data. The number of segments that are generated depends on the amount of annotations data to be sent.

The following parameters are then added to the URL that is specified by the annotationSavePost parameter.

Parameter Description
size The size in bytes of the URL encoded annotations data that is being sent.
numdata The total number of data segments that are to be sent.
data <N> The URL-encoded annotations data, where<N> is the sequential identifier for the segment.

IBM Daeja ViewONE then calls the server object and passes the data with a content-type of application/x-www-form-urlencoded.

On the server, IBM Daeja ViewONE retrieves the annotations data from the URL by concatenating the data<N> segments. URL-encoded data is normally handled by the web server, so this approach is not an issue. You can check the data that is retrieved by comparing the value of the size parameter that is passed in the URL to the size of the data that is received.

Each time that IBM Daeja ViewONE calls the object to save an annotation, the object sends back a confirmation. This confirmation takes the form <OK> for a successful save operation or FAILED for a failed save operation.