Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Lourdes Edwards   on Aug 18 In Java Category.

  
Question Answered By: Balbir Kaur    on Aug 18

You can achieve this by using token feature in Struts:



public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
throws Exception {
ActionMessages errors = new ActionMessages();
if (!isTokenValid(request)) {
errors.add("error.duplicaterequest", new ActionMessage("error.duplicaterequest"));
}
resetToken(request);
if (!errors.isEmpty()) {
saveErrors(request, errors);
saveToken(request);
return (mapping.getInputForward());
}
return mapping.findForward("success");
}

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Back Button Or get search suggestion and latest updates.


Tagged: