private entrycontenttable entrycontenttable ; private string ent_content_type; private string entry_con_val; private string entry_con_tag; private int ent_con_hide; public string execute(){ string flag=input; system.out.println("hello"); try { session=connectionprovider.getsession(); transaction=session.begintransaction(); entrycontenttable=new entrycontenttable(); entrycontenttable.setentry_cont_type(getent_content_type()); entrycontenttable.setentry_cont_value(getentry_con_val()); entrycontenttable.setentry_cont_tag_name(getentry_con_tag()); session.save(entrycontenttable); transaction.commit(); flag = success; } catch (exception e) { system.out.println(e.tostring()); e.printstacktrace(); } finally{ return flag; } } public string entconupdate() { string flag=success; try{ system.out.println("hide value mmmmmmmmm ::: " + ent_con_hide); session=connectionprovider.getsession(); transaction=session.begintransaction(); entrycontenttable=(entrycontenttable)session.load(entrycontenttable.class, ent_con_hide); entrycontenttable.setentry_cont_type(getent_content_type()); entrycontenttable.setentry_cont_value(getentry_con_val()); entrycontenttable.setentry_cont_tag_name(getentry_con_tag()); session.update(entrycontenttable); transaction.commit(); return flag; }catch (exception e) { e.printstacktrace(); system.out.println("exception in update ecma action :: " + e.tostring()); flag = input ; return flag; } } @override public void setsession(map map) { this.sessionmap = map; } public string getent_content_type() { return ent_content_type; } public void setent_content_type(string ent_content_type) { this.ent_content_type = ent_content_type; } public string getentry_con_val() { return entry_con_val; } public void setentry_con_val(string entry_con_val) { this.entry_con_val = entry_con_val; } public string getentry_con_tag() { return entry_con_tag; } public void setentry_con_tag(string entry_con_tag) { this.entry_con_tag = entry_con_tag; } public entrycontenttable getentrycontenttable() { return entrycontenttable; } public void setentrycontenttable(entrycontenttable entrycontenttable) { this.entrycontenttable = entrycontenttable; } public int getent_con_hide() { return ent_con_hide; } public void setent_con_hide(int ent_con_hide) { this.ent_con_hide = ent_con_hide; }
}
this java class , entering chinese values through jsp pages showing garbage value in database mysql workbench. read xml file chinese data jsp pages not showing chinese data=?
to debug...
- load xml file xml editor notepad++ supports unicode.
- make sure jsp file explicitly stating returning unicode. this starting point jsp.
- make sure mysql tables using unicode.
Comments
Post a Comment