I created a simple text box
This is the integration.xmlCode:<form action="write"> Input a String <input type="text" name="data" /> <br/><input type="submit"> </form>
and this is my controllerCode:<int:channel id="input"> <int:interceptors> <int:wire-tap channel="logger"/> </int:interceptors> </int:channel> <int:logging-channel-adapter id="logger" level="DEBUG"></int:logging-channel-adapter> <int-file:outbound-channel-adapter auto-create-directory="true" directory="file:/output" channel="input"></int-file:outbound-channel-adapter>but no directory is being created. Where am i wrong?Code:@RequestMapping("write") public void write(@RequestParam("data") String data){ ApplicationContext ctx=new ClassPathXmlApplicationContext("integration.xml"); MessageChannel channel= ctx.getBean("input",MessageChannel.class); channel.send(MessageBuilder.withPayload(data).setHeader(FileHeaders.FILENAME, "myfile.txt").build()); }
Thanks


Reply With Quote