You're not giving us much to work with here.
I assume ImageCaptchaServlet is a 3rd party library.
Have you read their documentation?
I'm guessing that it would have some sample code you could use.
Do you know how to retrieve form parameters from a
servlet or
JSP?
Do you know how to store parameters using the scoped objects provided by the servlet spec to use them later?
Show us some of what you've done and it will be easier for us to help you.