List of usage examples for com.liferay.portal.kernel.util WebKeys CAPTCHA_TEXT
String CAPTCHA_TEXT
To view the source code for com.liferay.portal.kernel.util WebKeys CAPTCHA_TEXT.
Click Source Link
From source file:com.liferay.faces.bridge.demos.validation.CaptchaTestValidatorBean.java
License:Open Source License
public String getCorrectCaptchaValue() { if (correctCaptchaValue == null) { FacesContext facesContext = FacesContext.getCurrentInstance(); ExternalContext externalContext = facesContext.getExternalContext(); Map<String, Object> sessionMap = externalContext.getSessionMap(); correctCaptchaValue = (String) sessionMap.get(WebKeys.CAPTCHA_TEXT); if (correctCaptchaValue == null) { return "Correct Captcha Value"; }/*from w ww . j av a2 s .c o m*/ } return correctCaptchaValue; }