cancel
Showing results for 
Search instead for 
Did you mean: 

How to create and access cookie with in iView ?

Former Member
0 Kudos

Hi,

I have created iViews using .Net PDK for SAP.

Is it possible to create a cookie using code of iView and use this cookie to access an external application.

Regards,

Vikas Khandpur

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

U cud add this code to the java iview:

setting a cookie:

Cookie fCooky = new Cookie("flag","false");

response.addCookie(fCooky);

fCooky.setPath("/");

Reading the cookie:

Cookie[] cook = request.getServletRequest().getCookies();

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

Cookie cc = cook<i>;

if(cc.getName().equals("flag")){

response.write(cc.getValue()toString());

}

}

Iam not sure how u wud do it in a .NET Iview.

Sry!

Regards,

P.

Former Member
0 Kudos

Hi Peter,

Thanks for the reply.

But I am still not able to create the cookie using .net.

Can some one please help me on this matter.

Regards,

Vikas Khandpur

Former Member
0 Kudos

Hi Vikas,

Maybe this document helps you out:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/security/java and .net code samples for sap logon ticket verification.pdf

Hope it helps.. I'm not very familiar with .net either,

Ville