Launching the viewer
The HTML5 Line Data Viewer is launched by redirecting the servlet request to open a document. When the servlet
receives a request to open a line data document, it must forward this request to the
Viewer.html
file,
passing parameters along with the request. The parameters that need to be passed are as follows: - action
- The callback servlet. It is the servlet that processes the viewerPassthru() call.
- docid
- The encrypted docid for the line data document you are wanting to view. Make sure the value here is encoded. (See URLEncoder class.)
- folder
- The name of the folder. Special characters in Content Manager OnDemand folder names require that the folder name be URL encoded. (See URLEncoder class.)
- language
- The language of the browser for this request. This value can be obtained by reading the Accept-Language header of the request object.
The sample code that follows shows how your redirect might
look:
response.sendRedirect (request.getContextPath() + “LineDataViewer/Viewer.html” +
“?action=” + request.getRequestURI() +
“&docid=” + URLEncoder.encode(docId, “UTF-8”) +
“&folder=” + URLEncoder.encode (odFolder.getName(), "UTF-8") +
“&language=” + request.getHeader(“Accept-Language”));
This will redirect
the browser to Viewer.html
which, once downloaded, will start the process of retrieving
and viewing the specified line data document.