How to pass a hidden variable to servlet/action class on clicking of a hyperlink in jsp page.
Create an HTML form with a hidden field containing the value of the variable and the action attribute pointing to the servlet you want to call Finally On click of the Hyperlink, use javascript to perform a post action on the form.
A few references:- Calling a javascript function in Hyperlink. Submit a form via javascript