07-04-2013 09:19 AM
public class GetValidationProgressionBean extends DeclarativeWebScript {
@Override
protected Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache) {
HttpServletRequest httpReq = ((WebScriptServletRequest) req).getHttpServletRequest(); //org.alfresco.repo.web.scripts.RepositoryContainer$BufferedRequest cannot be cast to
//org.springframework.extensions.webscripts.servlet.WebScriptServletRequest" => WebScriptServletRequest wraps the HttpServletRequest
ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); //returns null
HttpServletRequest request = requestAttributes.getRequest(); //Exception due to requestAttributes = null
HttpSession httpSession = request.getSession();
ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder.currentRequestAttributes() //No thread-bound request found: Are you referring to
//request attributes outside of an actual web request, or processing a request outside of the originally receiving thread?
HttpSession session = ServletUtil.getSession(); //returns null
…
}
07-04-2013 10:20 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.