Hi Florian, thanks for your reply. Yes, I have put my code in the getService method, so far it seems that the CMIS client I use (chemistry-opencmis) uses that cookie in every URL it requests. In case anyone needs to do something similar, the cookie I created was like:
HttpServletRequest request = (HttpServletRequest) context.get(CallContext.HTTP_SERVLET_REQUEST); HttpServletResponse response = (HttpServletResponse) context.get(CallContext.HTTP_SERVLET_RESPONSE); Cookie myCookie = new Cookie(myName, myValue); result.setDomain(request.getServerName()); result.setPath(request.getContextPath()); result.setVersion(1); result.setMaxAge(-1); response.addCookie(myCookie); Regards. Jorge El sáb., 26 sept. 2020 a las 14:47, Florian Müller (<[email protected]>) escribió: > Hi Jorge, > > the getService() method is the right place because all CMIS requests > pass this method. > > Something like this should do the trick: > ||((HttpServletRequest) > context.get(CallContext.HTTP_SERVLET_REQUEST)).getSession(); > > > - Florian > > > Hello all, > > I am trying to send from an implemented CMIS server a Cookie whenever a > > request is made by a CMIS client. Where should I do that? From what I > have > > read it should be in my service factory class (which extends from > > AbstractServiceFactory), in the getService method, right? Is it possible > to > > make that cookie be sent on each request made by the CMIS client? > > > > I am debugging on the client side StandardAuthenticationProvider class > and > > it seems that it keeps cookies per requested URL, but I am not sure how > to > > set the cookie in server side so it will be used by all requests (even if > > that URL has not been used before). > > > > Any help is appreciated. > > > > Best Regards. > > > > Jorge > > > >
