Skip to content
Advertisement

How to prevent SQL Injection with JPA and Hibernate?

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:

JavaScript

How will i prevent Sql Injection in this scenario ?The create table syntax of loginInfo table is as follows:

JavaScript

Advertisement

Answer

JavaScript

You have other options too, see this nice article from mkyong.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement