Question: I am working on a web application that is used to print user receipts based on the supplied receipt number. I want to enhance it in such a way that when i supply receipt numbers from 1 to 100 it will print all 100 receipts. Is there any ways in Java to implement this. How can i implement this in Java ?

Answer: 
Good frameworks give you a ready solution to common problems. Reinventing solutions for yourself probably will be excessive work. As a learning exercise coming up with stuff for yourslef has some value. To get a real job done efficiently use a framework. 

This does assume that good frameworks exist in your world ...
Frameworks are great for making sure you code to a regimented fashion and that your code is readable. They also offer lots of code library's that will be able to save you alot of time in developing web apps. 

Zend framework has a huge amount of code library's that you can include into your app to extend it easily, and for data mining having access to these library's would be very beneficial as I'm sure there are many data mining library's already made for Zend. 

Symfony framework great for developing websites quickly and is very strict using innodb for its database tables which insures database integrity and is useful if you intend to develop a strict relational database. The admin generator is also amazingly quick for developing content management systems for websites you design. 

If you are going to take on a framework I would look at this tutorial <http://anantgarg.com/2009/03/13/write-your-own-php-mvc-framework-part-1/> which walks you through your first MVC(model view controler) framework and is far more simple than jumping straight into a full framework like Zend. I would just follow this tutorial until you have a decent grasp coding in an mvc style, its not really worth re-inventing the wheel due to the amount of time involved and the quality of existing frameworks.

Hope this helps

Luke