Announcement Announcement Module
Collapse
No announcement yet.
I just want test some new feature of 3.2.0m2, I find it is hard to transfer data. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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, 02:43 PM.
Working...
X