how do i filter single quote ' in java. I am haveing a search box . if anyone types a single quote ' in that box i am geting a databsee error.
i dont want to filet it in javascript or at Database level, i want to do it in java only how can i do that i dont want to loose it completely, is there any other way. wil replacing the quote with \' wil work??