• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

handle special characters from text area using

 
Ronnie Phelps
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to use request.getParameter("TEXTAREANAME") when sending a request from a form via a JSP. But I get unexpected results when entering characters(i.e. ') in that text field. I understand I may have to attach a backslash to specify this character is literal(i.e \'). Is there anyway I can have this special characters tagged with the (\) or will I have to manually add this using String buffers replace method?
 
Ronnie Phelps
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think this is an SQL problem because I'm trying to do an insert into a database. How do I insert a string of text that contains the character ' in it when the format of Insert uses ' as a delimeter?
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think if you use a PreparedStatetment the driver will handle this invisibly under the covers.

Dave.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic