cancel
Showing results for 
Search instead for 
Did you mean: 

IWebContextAdapter usage yields NoClassDefFoundError on NW2004s

Former Member
0 Kudos

Hello,

Can anyone indicate me replacement solution for NW2004S on the following code:

((com.sap.tc.webdynpro.services.sal.adapter.core.IWebContextAdapter) WDWebContextAdapter.getWebContextAdapter()).getHttpServletResponse()

As of 2004S, this yields:

java.lang.NoClassDefFoundError: com/sap/tc/webdynpro/services/sal/adapter/core/IWebContextAdapter

Accepted Solutions (0)

Answers (4)

Answers (4)

RadouaneSbaa
Explorer
0 Kudos

Hi all,

I am facing the same problem.

Can anyone explain how to read and write some cookies ?

Your help greatly appreciated.

Best regards

Radouane Sbaa

Former Member
0 Kudos

Hi

u can use

IWDProtocolAdapter adapter=WDProtocolAdapter.getProtocolAdapter();

Regards

Hazrath

Former Member
0 Kudos

Hi All,

Has anyone been able to resolve this? I am facing teh saem problme where we used taskbinder to access cookies in ep6 but now in 2004s cannot find a way around this. I also wish to link in with mss team viewer. I can of course subscribe to the event but it will not take the initial value this is why I was acessing the databag.

Any help appreciated.

Regards,

Niall

Former Member
0 Kudos

The only way I've found to get around this is to place a "helper" iview on the same page as my custom application. This helper iview is a KM iview that contains javascript that reads the cookie from the teamviewer and launches an event to the web dynpro application using EPCF.

Former Member
0 Kudos

Please can you tell me how to find the session id with the new IWDProtocolAdapter class??

Former Member
0 Kudos

Marius,

You were warned: <a href="/people/bertram.ganz/blog/2005/02/02/never-ever-hijack-internal-web-dynpro-classes-and-interfaces">Never Ever Hijack Internal Web Dynpro Classes and Interfaces</a>

Why you need HttpServletRequest in this case? Prbably same can be done with "legal" IWDProtocolAdapter class...

VS

Former Member
0 Kudos

Valery,

Can you give me a hint where to find any information about IWDProtocolAdapter ? I couldn't find that by myself anywhere.

Thanks,

Marius

Former Member
0 Kudos

Hi Valery

I got same problem, I have gollowing code

TaskBinder.getCurrentTask(). getWebContextAdapter().getHttpServletResponse()

which works fine in sp15 but in 2004s its giving noclassfound excepetion. instead of WebContextAdapter I used protocaladapter class but this one also giving error

can you suggest me solution for this

Regrds

Keerthi

Former Member
0 Kudos

keerthi,

What's for you need HttpServletRequest?

There are some properties of this object that are returned by public WD classes (like request parameters), so probably you can solve your task without request object that is no longer available in WD applications.

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

Former Member
0 Kudos

Hi valery

I am using HttpServlet request and Httpservelt response, to read and write values stored in cookies. So I am wondering is there any alternative way to avoid using cookies to store my application parameter values.

Regards

keerthi

Former Member
0 Kudos

Keertthi,

There is no way to read cookies in WD application. Period. Also there is no official way to write cookies, you may use deprecated IFrame control, dynamically write HTML source to it (kind of), and set cookies via JavaScript in this generated source.

The next question is why you need to read/save cookies and what type of applications involved. If this is NW04s and both applications are WD, you may share data using WDScopeUtils. Note, however, that these data is transient and do not survive server restarts (unlike cookies that is saved on client). If you must pass information between WD and non-WD applications, then it is only possible to use technique described by <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=pyouhggpqqi%3d">maksim Rashchynski</a>, see <a href="/people/maksim.rashchynski/blog/2006/08/07/intercomponent-parameters-exchange">Intercomponent parameters exchange</a>

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

Former Member
0 Kudos

Can anybody give me following API com.sap.tc.webdynpro.services.sal.adapter.api

I m not getting it

Former Member
0 Kudos

Hi Valery

I need to intergrate my WebDynpro app. with the MSS Team Viewer.

To do this correctly I need to read a cookie to fetch the currently selected employee.

Do you know how to do this if I can't read cookies?

/Jacob