if its a form then when you get the data in the next page .. call a bean which modified the
string by adding an escape character before the '
call the bean , set the string , call the modify function and then get the string by the getter method.
use any string manipulation method like StringBuffer etc...
i did the same .. then pass the modified string for insertion in the database...
let me know if it works for you