Dear Frinny,
I have done a JSP-page for a customer using these commands once. (To be precise, Not to block the client's IP address, but to write it to a log file only). It turned out that I only got 2 different IP addresses in my log from thousands of requests!!! I figured out that these addresses belonged to the 2 proxy servers of the company!
That means even if your company has no proxy server, the client may have: his company, his ISP, or one of the global servers in the routing table .That has the effect that if you block one IP-address, you also block thousands of other users.
So this solution is not usable. As far as I know you can only block a user by providing a username/password login mechanism for everyone and then disabling his account.
But maybe there is a solution I don't know of to get the sender's IP address (Something like tracert or email-header functionality). Maybe something new with the JDK6 or SSL-connection?
But even then I would not block longer than 10 minutes. Once the user sees he is blocked he would simply cancel the connection to his internet provider and log on again to get a new IP address automatically. (and some other new poor guy who just happened to log on the same time gets the reused old IP address and is blocked for the rest of the 10 minutes! (which is not good, but better that being blocked for the rest of his life :-))
So I am eager to see the OP's (Naveenkongati) design he claims to have done.
Or, Frinny, is there a way to get the client's MAC address (the unique number of his network card) somehow?