on 05-17-2010 9:43 AM
Hi,
We are migrating our code from 2004 to 2004s. Here the type cast ((com.sap.tc.webdynpro.services.sal.adapter.core.IWebContextAdapter) WDWebContextAdapter.getWebContextAdapter()).getHttpServletRequest(); doesn't work anymore.
How do I read cookies ? Is there any other legal way of reading/writing cookies in WD for 2004s?
Thank you.
Ashish
Hello Ashish,
Please, try the following alternative that uses internal classes to get the HttpServletRequest from below code .
(HttpServletRequest)TaskBinder.getCurrentTask().getProtocolAdapter().get
RequestObjectInternal().getProtocolRequest();
I hope this helps you.
Regards,
Blanca
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have to get the session and server name and that cannot be done using request parameters. Blanca's suggestion worked perfectly.
Thanks guys for the replies.
Ashish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This approach looks workable, thank you. But the 2004s IDE is not resolving the HttpServletRequest object. Even when I explicityly add the import, it says that it cannot resolve type. Do I have to explicitly add a jar file ? How I can resolve this issue ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.