Package edu.pdx.cs.joy.jdbc
Class SQLInjectionExample
java.lang.Object
edu.pdx.cs.joy.jdbc.SQLInjectionExample
Demonstrates the security vulnerability of using Statement versus PreparedStatement
for database queries. This example shows how SQL injection attacks work and how
PreparedStatement protects against them.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classSimple Employee class to hold employee data. -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
SQLInjectionExample
public SQLInjectionExample()
-
-
Method Details
-
main
- Throws:
SQLException
-