cancel
Showing results for 
Search instead for 
Did you mean: 

How can I uses Web Dynpro get/set cookie?

Former Member
0 Kudos

HI,

My question is how can I uses Web Dynpro get/set cookie?

Anybody can help me?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi

if you want use cookies , best thing is develop Par Application and use the Cookies .

Answers (5)

Answers (5)

Former Member
0 Kudos

Thanks,murali !

Former Member
0 Kudos

Hi,

Use this code,

HttpServletRequest req = TaskBinder.getCurrentTask().getWebContextAdapter().getHttpServletRequest();

if (req != null)

{

Cookies[] cc= req.getCookies();

}

For this you need to add servlet.jar file in classpath.

Regards,

Sunaina Reddy T

Former Member
0 Kudos

Hi,

Their no way to access the cookies from Webdynpro, it will be handled by the framework.

Thanks

Avik

Former Member
0 Kudos

Hi Conggang Xu,

HttpServletRequest request=(HttpServletRequest)TaskBinder.getCurrentTask().getProtocolAdapter().getRequestObjectInternal.().getProtocolRequest();

Cookie[] c=request.getCookies();

But don't use Java native Api, it is no longer used by webdynpro framework.

Regards,

srikanth

susmita_panigrahi
Active Participant
0 Kudos

Hi

Please refer the below forum:

1.

Thanks

Susmita

Former Member
0 Kudos

I dont think one can access methods to set or get cookies using web dynpro since the request object isnt accesable? Why would you need to access cookies? whats the scenario?

Thanks,

GLM