tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deacon Marcus" <deacon_mar...@wwtech.pl>
Subject RE: Handling apostrophes
Date Mon, 22 Oct 2001 09:23:26 GMT
Hi,
Try using prepared statements. They allow parameters, so basically you
define a query with parameters, then set parameter values, and jdbc takes
care of all char-quoting.

Greetings, deacon Marcus

> -----Original Message-----
> From: dave.prout@bt.com [mailto:dave.prout@bt.com]
> Sent: Monday, October 22, 2001 10:55 AM
> To: tomcat-user@jakarta.apache.org
> Subject: Handling apostrophes
>
>
> Hi all,
>
> 	I'm developing an application which uses java servlets and JSPs and
> a MySQL database running on Tomcat 4.0.
>
> 	I take user input, store it on the db, then display it again. As
> soon as someone tried inputiing an apostrophe, it all fell over. It seems
> that I have to encode and decode every single text field. Is this correct,
> or is there a better way ?
>
> Thanks
>
> Dave
>
>
>


Mime
View raw message