cancel
Showing results for 
Search instead for 
Did you mean: 

How to set a custom cookie?

Former Member
0 Kudos

Is it possible to set a cookie in WebDynpro application using NW 2004s framework?

If so, how to do that?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

former_member189631
Active Contributor
0 Kudos

Hi Srini,

Have look at these,

https://help.sap.com/javadocs/index.html

Former Member
0 Kudos

Thanks for the response. However, I am not trying to read a cookie in my webdynpro application as the thread you pointed is talking about.

I would like to create my own cookie in WebDynpro application and set it on the client browser in NW2004S.

Former Member
0 Kudos

Srinivas,

WD API has no methods that allow direct manipulations of HTTP Request object. Period.

The simple workaround I see is:

-- Embed IFrame control in WD view

-- Populate content of IFrame dynamically with IWDCachedWebResource as described in my bolg post <a href="/people/valery.silaev/blog/2005/11/23/display-formatted-text-using-webdynpro-for-java">Display formatted text using WebDynpro for Java</a>

-- In your case you have to path HTML source with empty <body> tag but with <script> in <head>. The JavaScript in head may set necessary cookie (web if full of examples

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

Former Member
0 Kudos

Hi Valery,

Thanks for the pointer. However, I need some clarifications.

How do I pass dynamic values to this javascript? May be if I explain what I am trying to do, there might be an easier and better solution.

Our current portal consists J2EE applications running on Tomcat and has been built over 6+ years. Now we are trying to migrate towards Enterprise portal. In the interim, I need to establish Single Sign On between portal and custom applications. Our custom applications have their own version of logon ticket mechanism. What we want to accomplish (without getting into technical details of why) is after the user logs into portal, we create our custom logon ticket somewhere (either be a J2EE app, Web Dynpro or portal application) and <b>redirect</b> user to our J2EE portal home page.

This does two things for us.

1. Establishes Single Sign On between enterprise portal and our custom applications

2. Positions us to build new applications in portal

3. Positions us to migrate custom applications to portal in future

Having said that, How do we set a cookie (known as our custom logon ticket) in portal and redirect the user to our home grown portal home page.

Thanks

Former Member
0 Kudos

Srinivas,

Definitely, this can be done without direct cookies manipulation from WD application.

To establish SSO with 3-rd party system you need to develop and deploy custom login module.

Please see <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/ibm/how%20to%20set%20up%20single%20sign-on%20between%20an%20ibm%20websphere%20portal%20and%20the%20sap%20enterprise%20portal%20using%20jaas.pdf">How to Set Up Single Sign-On Between an IBM WebSphere Portal and the SAP Enterprise Portal Using JAAS</a> as example.

Or wait here for Maksim Rashchynski reply -- as SSO expert he will probably advise more detailed solution

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

Former Member
0 Kudos

Thanks for the response Valery.

As I have said earlier, issue isn't about Single Sign On. It's about continuing to support existing infrastructure before migrating to portal authentication.

Answers (0)