majid nakit wrote:thank you, I need to do some testing before using my connection in java beans, but what is wrong with this ?
The compiler already told you what's wrong with it. There's an unclosed character literal. I suppose you really meant to ask what that error message meant. Well, a character literal looks like this:
That's how you denote a character in Java. The code you posted contains quotes which don't delimit a single character like that. However maybe you meant those quotes to be actual quote characters instead of delimiters for character literals. If that's the case then you'll have to escape them properly.
But while you're refactoring that code so that it isn't inside a JSP, do yourself another favour and learn about PreparedStatements. They take care of all of the ugly quoting that you are trying to do there, among other things.
You'll find that if you use better practices (e.g. no scriptlets, PreparedStatements, and so on) in your programming then you won't get sucked into this kind of coding swamp.