cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping WebscriptRequest to HttpServletRequest

g_rathod
Star Contributor
Star Contributor
Hi,

I tried below code to map WebscriptRequest to HttpServletRequest but it didnt work.
HttpServletRequest httpReq = ((WebScriptServletRequest) request).getHttpServletRequest(); 

Anybody having idea, how do I cast it to get proper object of HttpServletRequest?
I want to get client IP using HttpServletRequest in my alfresco side webscript.
1 REPLY 1

kaynezhang
World-Class Innovator
World-Class Innovator

HttpServletRequest httpRequest = WebScriptServletRuntime.getHttpServletRequest(request)
HttpServletResponse httpResp = WebScriptServletRuntime.getHttpServletResponse(res);