please help me how to check with database(SQL Server) whether the entered username and password is valid.i want the code for it.please be quick.

1) there is a dedicated JSP forum
2) you shouldn't do that inside the JSP, but in a servlet or EJB
3) we're not here to do your work for you. We may give hints and help out but you have to do it yourself
4) we're not being paid here, so it's not up to you to tell us when to help you.
5) without knowing the exact system you're working with noone could write your code for you even if they were so inclined. There are hundreds of plausible implementations of security systems you'd have to interface with, each with thousands of actual variants.