Answer of encoding problem:
I think your problem is not database connection. You must override reset() and validate() abstract methods of your form bean as following:
public void reset(ActionMapping actionMapping, HttpServletRequest request) {
try {
request.setCharacterEncoding("UTF-8");
}
catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
super.reset(actionMapping, request);
}
public ActionErrors validate(ActionMapping actionMapping, HttpServletRequest request) {
try {
request.setCharacterEncoding("UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace(); .
}
return super.validate(actionMapping, request); //
}