In a page i have a multiple text boxes , where users can enter any sort of data.
I used h:inputTextarea
tag.
JSP/JSF:
<h:inputTextarea style="width:100%" value="#{abc.remark}" id="remarks" />
Java:
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark= remark;
}
and
insert into table1 ('Remarks','Other') values (this.getRemark() + "','"+this.getOther());
It works almost, but whenever user tries to enter single quote in remarks like
John's income is Good
it breaks down and throws java.sql.SQLSyntaxErrorException: ORA-00917: missing comma.
Query Screenshot from log:
Need resolution.