I am developing an application using hibernate. When I try to create a Login page, The problem of Sql Injection arises. I have the following code: How will i prevent Sql Injection in this scenario ?The create table syntax of loginInfo table is as follows: Answer You have other options too, see this nice article from mkyong.