How to use PIWIK API for my website (JSP)?

I have a website. I just want a basic feature added to my website. How to use PIWIK API for my website so that I can get the total no. of visitors for each webpage? My website has JSP pages.
Please help me with its complete procedure.