diff --git a/src/main/java/org/gcube/portlets/user/MailForm.java b/src/main/java/org/gcube/portlets/user/MailForm.java index 9d80b57..da8bf0b 100644 --- a/src/main/java/org/gcube/portlets/user/MailForm.java +++ b/src/main/java/org/gcube/portlets/user/MailForm.java @@ -26,8 +26,7 @@ import javax.mail.internet.InternetAddress; */ public class MailForm extends MVCPortlet { - @ProcessAction(name = "validateCaptcha") - public void validateCaptcha(ActionRequest actionRequest, + public void submitSuggestion(ActionRequest actionRequest, ActionResponse actionResponse) throws IOException, PortletException { String name = ParamUtil.getString(actionRequest, "name"); @@ -49,16 +48,6 @@ public class MailForm extends MVCPortlet { if (splits.length > 1) emailAddress = "info@"+ hostname.split("www.")[1]; } - try { - /** - * This is the actual code which validate captcha data entered by user. - */ - CaptchaUtil.check(actionRequest); - System.out.println("CAPTCHA validated successfully"); - } catch (CaptchaException e) { - e.printStackTrace(); - SessionErrors.add(actionRequest, "errorMessage"); - } String bodyTextHTML = "

From: " + name + "

"; bodyTextHTML += "

Email: " + email + "

"; bodyTextHTML += "

Message:

" + message + "

"; @@ -83,19 +72,5 @@ public class MailForm extends MVCPortlet { return result; } - /** - * The below code is responsible for rendering the CAPTCHA image - */ - @Override - public void serveResource(ResourceRequest resourceRequest, - ResourceResponse resourceResponse) throws IOException, - PortletException { - - try { - CaptchaUtil.serveImage(resourceRequest, resourceResponse); - } catch (Exception e) { - System.out.println(e.getMessage()); - } - } } diff --git a/src/main/webapp/html/mailform/view.jsp b/src/main/webapp/html/mailform/view.jsp index 3f7fa75..31a6a73 100644 --- a/src/main/webapp/html/mailform/view.jsp +++ b/src/main/webapp/html/mailform/view.jsp @@ -1,13 +1,8 @@ <%@ include file="init.jsp"%> - - - - - +