Actually, nevermind, I had made some changes in a different, unused
web.xml by accident, so the solution is much simpler than I had
thought it was... People wanting to do this must simply mark their
portlets:
<private-session-attributes>true</private-session-attributes>
in liferay-portlet.xml in order to get access to the portal session
attributes. Then, to access the attributes, the following code did
the trick:
FacesContext context = FacesContext.getCurrentInstance();
ExternalContext ext_context = context.getExternalContext();
PortletRequest req = (PortletRequest)
ext_context.getRequest();
HttpServletRequest request =
PortalUtil.getOriginalServletRequest(
PortalUtil.getHttpServletRequest(req));
String actualCaptchaValue =
(String)request.getSession().getAttribute(com.google.code.kaptcha.Constants.KAPTCHA_SESSION_KEY);
if (actualCaptchaValue.equals(captchaValue))
logger.debug("Matched Captcha!!");
else
logger.debug("Failed to match captcha! :-( ");
Sorry for the confusion, it was much less involved than I realized,
but still a bit tricky in the portal context.
Mike