Kishor Joshi wrote:one more question is how to check Number of parameters in the request?
request.getParameterMap() will get you all the parameters. That returns a Map. Check the Javadocs and see if you can figure out how to get the number of elements in a Map.
And good job getting rid of the scriptlets. The next step is to move your JavaScript to an external .js file.
And you need to change your href values and the "action" value to context relative paths. What's going to happen when you move your app to a new server?