This section describes how to enable a IBM® WebSphere® Multichannel Bank Transformation Toolkit application to support AJAX file upload requests.
To enable a WebSphere Multichannel Bank Transformation Toolkit application to support AJAX file upload requests, do the following steps:
<kCollid="ajax"description="html channel settings"> <fieldid="encoding"value="UTF-8"/> <fieldid="cookies"value="true"/> <fieldid="runInSession"value="true"/> <fieldid="requestHandler" value="com.ibm.btt.cs.ajax.AjaxHtmlRequestHandler"/> <fieldid="presentationHandler" value="com.ibm.btt.cs.ajax.AjaxHtmlPresentationHandler"/> <kCollid="fileHandlers"> <kCollid="sampleFileHandler"> <fieldid="implClass"value="com.ibm.btt.sample.SampleFileHandler"/> <fieldid="timeout"value="2000"/> <fieldid="maxSize"value="62914560"/> <fieldid="cachePath"value="c:\temp\fileupload\cache"/> <fieldid="filepath"value="c:\temp\fileupload\upload"/> <fieldid="memCacheSize"value="4096"/> </kColl> </kColl> </kColl>
<contextid="sampleFlowCtx"type="op"parent="sessionCtx"> <refKCollrefId="sampleFlowData"/> </context> <kCollid="sampleFlowData"dynamic="true"> <fieldid="accountNumber"value="955812345678n9uw88"/> <fieldid="token"/> <refKCollrefId="userImgs"/> </kColl> <!-- data for file uplaod --> <!-- a file info with name 'file' is mandatory, fileId field is mandatory developers can add more other file info here --> <kColl id="file"> <field id="name" /> <field id="size" /> <field id="fileId" /> </kColl> <kColl id="userImgs"> <!-- latest upload file, this item is mandatory --> <refDatarefId="file" /> <!-- if there are more than one files uploaded, the other uploaded files info will be added into the receivedFiles area --> <iColl id="receivedFiles"> <refDatarefId="file" /> </iColl> <!-- file handler that will operate the file uplaoding, this one is mandatory --> <field id="handler" value="sampleFileHandler" /> </kColl> </kColl>
<servlet> <display-name>FileUploadServlet</display-name> <servlet-name>FileUploadServlet</servlet-name> <servlet-class>com.ibm.btt.cs.ajax.FileUploadServlet</servlet-class> <init-param> <!-- request timeout check duration, in milli-seconds, default value is 20*60*1000 --> <param-name>checkDuration</param-name> <param-value>2000</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>FileUploadServlet</servlet-name> <url-pattern>/FileUploadServlet</url-pattern> </servlet-mapping>