Announcement Announcement Module
Collapse
No announcement yet.
How to send my batch job configuration file to batch-admin Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to send my batch job configuration file to batch-admin

    Hello,
    I want to upload a file and hand it over to the http:inbound-channel-adapter where the file be processed next.
    How should i send the request?

    This is what i ve done:

    Code:
    This is the view:
    
    <form action="uploadjob" method="post" enctype="multipart/form-data">
     Job Configuration File<input type="file" value="Upload" name="file" />
     <input type="submit" value="Upload">	
    </form>
    Code:
    public class FileUpload {
    	MultipartFile file;
      //getters and setters
    }
    Code:
    @RequestMapping(value="uploadjob", method=RequestMethod.POST)
    	public String upload(Model model, Locale locale, FileUpload file) throws MalformedURLException{
    		URL url=new URL("http://localhost:8080/org/path/to/inbound-channel-adpater/");
                    //I am getting the file here using file.getFile()
                    //What shud i do here to send the file
    		return null;
    	}
    Please help

  • #2
    Hi!

    How aboiut this one: https://github.com/SpringSource/spri...multipart-http ?

    Happy new year!

    Artem

    Comment

    Working...
    X