Skip to Content
0
Former Member
Dec 06, 2011 at 04:22 AM

How to get Cookie Name and Value Using HttpGetterCallback - CE 7.3

60 Views

Hi All,

We are migrating from Netweaver 7.0 to 7.3. We are facing a issue when migrating the custom login module from 7.0 to 7.3.

Since WebCallback is deprecated and not to be used in Netweaver 7.3, we are finding difficulties in getting the cookie name and value. Please find below our coding for getting the cookie value using HttpGetterCallback. We are not getting the cookie name and value, Kindly let us know if we are implementing the HttpGetterCallback correctly.

HttpGetterCallback httpGetCookieCallback = new HttpGetterCallback();

httpGetCookieCallback.setType(HttpCallback.COOKIE);

Callback] callbks = new Callback[ { httpGetUrlCallback, httpGetCookieCallback };

callbackHandler.handle(callbks);

requestUrl = (String) httpGetUrlCallback.getValue();

Cookie] cookies = (Cookie [) httpGetCookieCallback.getValue();

if (cookies != null) {

for (int i = 0; i < cookies.length; i++) {

location.debugT("Cookies name " + cookies.getName()

+ " - value "

+ cookies.getValue());

}

}

Thanks and Regards,

Saravanan