public ActionForward
update(ActionMapping mapping,
ActionForm form,
HttpServletRequest
request,
HttpServletResponse
response) throws Exception {
EgForm egForm = (EgForm)
form;
Contact contact = new
Contact();
BeanUtils.copyProperties(contact,
egForm);
UserService
userService =
ServiceFactory.create();
userService.update(contact);
return
mapping.findForward(SUCCESS);
} |
public ActionForward
update(ActionMapping mapping,
ActionForm form,
HttpServletRequest
request,
HttpServletResponse
response) throws Exception {
EgForm egForm = (EgForm)
form;
Contact contact = new
Contact();
BeanUtils.copyProperties(contact,
egForm);
try{
InitialContext
ic = new InitialContext();
UserServiceLocalHome ul =
ic.lookup("UserService");
UserServiceLocal
userService = ul.create();
userService.update(contact);
}catch(){
}
return
mapping.findForward(SUCCESS);
} |
public ActionForward
update(ActionMapping mapping,
ActionForm form,
HttpServletRequest
request,
HttpServletResponse
response) throws Exception {
EgForm egForm = (EgForm)
form;
Contact contact = new
Contact();
BeanUtils.copyProperties(contact,
egForm);
UserService
userService =
WebAppUtil.getService("UserService",
rerquest);
userService.update(contact);
return
mapping.findForward(SUCCESS);
} |