cancel
Showing results for 
Search instead for 
Did you mean: 

Servlet call from Portal application to create cookie

preeti_pradhan
Explorer
0 Kudos
149

Hi,

we are just trying to use cookie creation in servlet and have this servlet called from portal application.

WE have one portal application testservlet .. which uses URLconnection to connect to the servlet url"dynamiccookie"

if I run the dynamiccookie servlet , its working fine and a cookie is created in browser

however if the same is done using the portal application( using URLconnection to Servlet URL ) : it goes to servlet but the cookie is not seen in browser not we get details in the request object of the cookie.

Please can you let me know what is being missed.

The cookie path is set to / and is secure .

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Dear Preeti Pradhan,

Why are you creating a servlet "dynamiccookie" and using it through url. This is not required. Create the required cookie in the portal application (abstract portal component application) itself and create an iview for it. Add this iview to AJAX Framework Page. So as soon as user logs in to the portal, this cookie will get created and will be available in header.

Thanks and Regards,

Kamal

preeti_pradhan
Explorer
0 Kudos

Hi,

Let me explain the scenario we want to achieve.. We have to display some critical KM messages as popup on portal. I want to create the cookie in Knowledge management project on button click of a particular message.

the cookie will be specific to particular message and if created on button click means user has read that message and should not be shown on next popup..

For now i was trying to use Portal application to call servlet which will create cookie.