cancel
Showing results for 
Search instead for 
Did you mean: 

DeclarativeWebScript in Alfresco 4.0

emmy
Champ in-the-making
Champ in-the-making
Hi,
i recently installed Alfresco 4.0.d and I'm verifying if the implementations done for Alfresco 3.4 work also with Alfresco 4.0.
I implemented a lot of DeclarativeWebScript and i override the executeImpl method as described in the documentation.


@Override
protected Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache) {
   HttpServletRequest servletReq = ((WebScriptServletRequest) req).getHttpServletRequest();
        ….
}

In Alfresco 3.4 i retrieved the HttpServletRequest in order to retrieve the request parameters. By executing the declarativewebscript in Alfresco 4.0 i noticed that the HttpServletRequest cast doesn't work anymore, because the WebScriptRequest passed as parameter is a RepositoryContainer@BufferedRequest.
Is there a way for retrieving the HttpServletRequest?

Thanks in advance,
Emanuela
1 REPLY 1

mitpatoliya
Star Collaborator
Star Collaborator
For getting the request parameter which are passed during call of webscript I do not think you need to type cast it to the HTTPservletRequest object.
You can directly use the WebscriptRequest object to get the request parameter's value.