Results 1 to 1 of 1

Thread: I just want test some new feature of 3.2.0m2, I find it is hard to transfer data.

  1. #1
    Join Date
    Oct 2012
    Posts
    1

    Default I just want test some new feature of 3.2.0m2, I find it is hard to transfer data.

    I want use Callable object, but I have many information store in request. how to fetch them inside my new callable object?

    my part of code like below:

    Code:
    @RequestMapping(value="/addimages", method=RequestMethod.POST)
    	public @ResponseBody Callable<String> postImages(HttpServletRequest request,  Model model, @ModelAttribute("pbid") UUID pbid) {
    		//UUID pbid=(UUID) request.getSession().getAttribute("pbid");
    		return new Callable<String>() {
    			public String call() throws Exception {
    		 CommonsMultipartResolver mrs=new CommonsMultipartResolver(request.getSession().getServletContext());
    		if (mrs.isMultipart(request)){
    		//MultipartHttpServletRequest multipartRequest = mrs.resolveMultipart(request);
    		MultipartHttpServletRequest multipartRequest= (MultipartHttpServletRequest) request;
    		List<MultipartFile> npl=multipartRequest.getFiles("fileinput");
    The java compile give me error is:

    Cannot refer to a non-final variable model inside an inner class defined in a different method

    ps: I some time meet java.util.ConcurrentModificationException when I do some server part. Is that the problem of spring 3.1.2. release?
    Last edited by foretribe; Oct 17th, 2012 at 01:43 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •