public ActionForward swap(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
throws Exception {
int idx1 = Integer.parseInt(request.getParameter("idx1"));
int idx2 = Integer.parseInt(request.getParameter("idx2"));
ReplacementsForm rf = (ReplacementsForm) form;
ReplacementItem item1 = (ReplacementItem) rf.getReplacementItems().get(idx1);
ReplacementItem item2 = (ReplacementItem) rf.getReplacementItems().get(idx2);
Replacement rep1 = item1.getReplacement();
Replacement rep2 = item2.getReplacement();
String mimeType1 = rep1.getMimeType();
String sitePattern1 = rep1.getSitePattern();
String matchPattern1 = rep1.getMatchPattern();