This lot should not be in a JSP.
You should have a servlet that gets the data you need to display and then forwards to the JSP.
If nothing else it makes it a lot easier to debug any issues.
What line of code is that error being thrown from (this is one case, for example, where it would be easier as a servlet)...
In this case, though, I can se the issue.
You are trying to read data from the ResultSet before you have called rs.next(), hence the "before start of result set" error.
One suggestion (apart from the "move to a servlet" one). You should query the database to return only the entry you want, rather than all the entries in the table and then try and find the one that matches.
SELECT * FROM registration WHERE user_name = ? and password = ?
I would also not return the password unless you really want it. And if you did really want it then I would sit down for a while until that desire went away.