Textbox to be used as variable name ?

Hi all,
I've this following piece of code. It is a simple hands on exercise for my learning.
I retrieve data from a table called cat and what i would like to do is , go to the action page only if there is a record for that username and password.
Also i get an error while trying to use textbox names or id's inside java tags of JSP. Is there a way to access those elements.