Hi,
I'm trying to create a webscript, which renders a login/logout link. My authentication is done by Alfresco user factory. I did a working java-backed webscript, which after direct access in browser works correctly, but when I add this webscript as a component into page, I can't access HttpServletRequest, which is needed by AuthenticationUtil.
I tried following snippets:
andCode:HttpServletRequest httpRequest = ((WebScriptServletRequest)req).getHttpServletRequest(); produces java.lang.ClassCastException - org.springframework.extensions.webscripts.LocalWebScriptRequest cannot be cast to org.springframework.extensions.webscripts.servlet.WebScriptServletRequest
which returns null :-(.Code:HttpServletRequest httpRequest = WebScriptServletRuntime.getHttpServletRequest(req);
So my question is: how can I get HttpServletRequest inside java-backed webscript, which is inside page as a component?
Thanks in advance!



