cancel
Showing results for 
Search instead for 
Did you mean: 

Webscripts and cookies

kma
Champ in-the-making
Champ in-the-making
Hi,

Is there any way where I can set a cookie from
a webscript. If I have a java backed webscript
I would like to do something like this:
AuthenticationHelper.setUsernameCookie(…)

but as far as I can see I do not have access to
the HttpServletRequest.

Any idea ?

Thanks,
Karsten
1 REPLY 1

davidc
Star Contributor
Star Contributor
If you're executing your java-backed web script in the servlet environment, you can cast the WebScriptRequest & WebScriptResponse to WebScriptServletRequest & WebScriptServletResponse respectively.  Each of these provide access to HttpServletRequest & HttpServletResponse.