Skip to Content
0
Former Member
Nov 08, 2012 at 08:07 PM

File Upload - Calling bls via JSP

59 Views

I'm using the following jsp to upload a document and call a bls transaction

<%

boolean isMultipart = DiskFileUpload.isMultipartContent(request);

DefaultFileItemFactory factory = new DefaultFileItemFactory();

DiskFileUpload upload = new DiskFileUpload(factory);

List /* FileItem */ items = upload.parseRequest(request);

Iterator iter = items.iterator();

while (iter.hasNext()) {

FileItem item = (FileItem) iter.next();

if (!item.isFormField()) {

String fileName = item.getName();

String contentType = item.getContentType();

File uploadedFile = new File("\\\\Livadmmdvci1\\MII_Backups\\Upload\\" + fileName.substring(fileName.lastIndexOf("\\") + 1));

item.write(uploadedFile);

String site = new String("/XMII/Runner?Transaction=CustomerComplaintTracking/UploadFile-b&FILETYPE=" + contentType + "&FILENAME=" + (fileName.substring(fileName.lastIndexOf("\\") + 1)));

response.sendRedirect(site);

}

}

%>

However the response.sendDirect(site) line is routing my application to a page displaying the output xml from my bls. I'm wondering if there is a way to call my transaction via the runner without using the response.sendDirect? I would like to upload the document and call the transaction and than direct the application back to the original screen. Any help is appreciated. Thanks