Deployment of Knime mining tool as stand alone appliaction in java


I have to apply data mining on my database, for this purpose I want to use knime.I'm preparing a java based web application whcih retrieves data from database,process it and displays it through JSP page on browser.

What is the procedure of deploying knime mining result in java apllication and displaying it in a browser ???

I think you will need to use the headless batch processing to do what you want. 

Step 1: Your application prepares some input files 

Step 2: Run KNIME headless

Step 3: Pick up the output and do whatever you want