File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Validation for Text Area Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Validation for Text Area" Watch "Validation for Text Area" New topic
Author

Validation for Text Area

Praveen Reddy
Ranch Hand

Joined: Jul 12, 2006
Posts: 51
Hi

Can any one please let me know how to do validations for text area in order to prevent SQL Injections.

i dont want any one to inject some SQL statements to update my database.

Thanks
Praveen
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60997
    
  65

This is not something that you should be handling at the client. Using best practice JDBC techniques, such as prepared statements, is the way to handle SQL injection.

I'll move this off to the JDBC forum for further advice.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Praveen Reddy
Ranch Hand

Joined: Jul 12, 2006
Posts: 51
Thanks for the Suggestion i am using hibernate i want to validate my text area
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3704
    
    5

Moving to Object Relational mapping forum, although I suspect SQL injection is not possible in Hibernate since there are no direct SQL queries. SQL injection only plays a part when you are forwarding input directly into a SQL query such as


My Blog: Down Home Country Coding with Scott Selikoff
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Validation for Text Area