User Interface
This chapter gives a brief overview of the sample upload functionality as integrated into the standard Web Center application for demonstration purposes.
Menu Items
The Tools menu in the main menu bar includes four items related to file upload:
-
Upload file – lets you select a file, uploads it to the server and stores it on the server (variant fileUpload1.) By default, only Excel files (.xls, .xlsx) are accepted.
-
Upload files – lets you select multiple files, uploads them to the server and stores them on the server (variant fileUpload2.) By default, only text files (.txt) are accepted.
-
Upload and process files – lets you select multiple files, uploads them to the server, stores them on the server and starts programs to process the files (variant fileUpload3.) By default, only text files (.txt) are accepted.
-
Show state of uploaded file processing – displays status records that have been written by the handler programs (variant fileUpload3.)

The rest of this chapter describes these menu items in more detail.
Upload File
On selecting the menu item "Upload file", a page to upload a single file is displayed. The "Browse…" button lets you select a file. Clicking the "Upload" button starts the file transfer to the server.

The uploaded file is stored in the application’s temporary folder (below TOMCAT_HOME/work). Its name is concatenated from the uploading user’s DN and a time stamp.
Upload Files
On selecting the menu item "Upload and process files", a page to upload up to four files is displayed. The "Browse…" buttons let you select the files. Clicking the "Upload" button starts the file transfer to the server.

The uploaded files are stored in the application’s temporary folder (below TOMCAT_HOME/work). Their names are concatenated from the uploading user’s common name and the original file names.
Upload and Process Files
On selecting the menu item "Upload and process files", a page to upload up to three files is displayed. The "Browse…" buttons let you select the files. You’ll find some appropriate sample input files in the folder SAMPLES_FOLDER/inputFiles/fileUpload3. Clicking the "Upload" button starts the file transfer to the server.

The uploaded files are stored in the file upload samples folder (SAMPLES_FOLDER/work). Their names are concatenated from the uploading user’s common name and a time stamp.
For each uploaded file, the provided sample Java program is started to process the file. The program is located in the folder SAMPLES_FOLDER/java. Its standard output and standard error are redirected to files in the folder SAMPLES_FOLDER/work.
The sample program reads the input file line by line. Each line is expected to represent a state record, for example
${date}#${originalFileName}#false#30# 2# 2#0
The program performs some placeholder substitutions and then simply appends the records to the uploading user’s LDAP attribute "dxrFileUploadState", for example:
fu3#20151222:102409#entries-30.txt#false#30# 2# 2#0
Note that the format of both the input files and the status records are specific to the provided sample program. Custom handler programs will usually have different input files and write differently-formatted status records.
The sample state records all start with fu3#. This notation serves to distinguish them from state records written by other handler programs. The time stamps ensure that the records are unique and they allow for sorting the records by their creation date.
Show State of Uploaded File Processing
The menu item "Show State of Uploaded File Processing" lists the status records for the logged-in user written by the sample program. The list is configured to extract the different components from each record and to display them in separate columns.
You can refresh, export or delete the list or delete selected entries from the list.

The list columns depend heavily on the format of the status records written. Custom status records will usually be displayed in quite different lists. The list configuration must therefore be carefully adapted to the specific use case.
A simpler status record list might just display the time stamp and a message:
