I'm using the Apache Commons FileUpload to receive file uploads. The below method works fine for all of the application servers tested, including Weblogic 12.1.3, except for Weblogic 10.3.6.
The parseRequest
method is returning an empty list which indicates that the HttpServletRequest
inputstream
is empty. Just looking for how I can get this working on a Weblogic 10.3.6 server?
@POST
@Path("upload/{environment}/{queueName}")
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON})
public Message putQueueFile(
@PathParam("environment") String environmentName,
@PathParam("queueName") String queueName,
@Context HttpServletRequest req) {
if (ServletFileUpload.isMultipartContent(req)) {
log.debug("putQueueFile:: Multipart form submission received");
// Create a factory for disk-based file items
DiskFileItemFactory fileItemFactory = createDiskFileItemFactory(req.getSession().getServletContext());
ServletFileUpload uploadHandler = new ServletFileUpload(fileItemFactory);
uploadHandler.setFileSizeMax(MAX_UPLOAD_FILE_SIZE);
try {
/*
* Parse the request
*/
List items = uploadHandler.parseRequest(req);
log.debug(String.format("putQueueFile:: Looping through %d items", items.size()));