cancel
Showing results for 
Search instead for 
Did you mean: 

WDWebContextAdapter get URL Param Referer

stefan_bosshard2
Explorer
0 Kudos

Hi,

we are using 2004s older than SP 7 are not able to use

com.sap.tc.webdynpro.services.sal.adapter.api.WDProtocolAdapter to get easy access to url params.

A JSP iView calls a WebDynpro iView and I need to get access to a specific url parameter in the webdynpro.

When I debug, I could see the MimeHeaders value:

<i>{{Accept: /},,{Accept-Language: en-gb,de-ch;q=0.5},{Content-Type: ....</i>

Can anybody help me, how I have access to param CKey within Java WebDynpro?

Thanks.

Stefan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Stefan,

Let me format a bit your text to make it looks like HTTP headers:

Accept: /

Referer: https://sapep-dev.ch.winterthur.com:56901/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!

2fwinterthur!2fhr!2fmss!2froles!

2fcom.winterthur.hr.mss_new!

2fcom.winterthur.hr.mss_myteam_new!

2fcom.winterthur.hr.eeprofile!

2fcom.winterthur.framework.eeprofilegeneraldatawd?

CKey=P+010800000017021SAP_R3_HumanResources2006010199991231

Accept-Language: en-gb,de-ch;q=0.5

Content-Type: ....

So it seems that CKey is not a parameter of WD application URL, but rather a parameter of JSP iView that calls WD, hence this parameter is located in "Referer" HTTP header.

The reason is that either your JSP doesn't pass this parameter further or WD iView does not pass parameter to WD application.

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

stefan_bosshard2
Explorer
0 Kudos

Valery Silaev,

> .. or WD iView does not pass parameter to WD application.

This was the point, we did forget to add this configuration that the parameters are passed to webdynpro.

In iView Property Editor we added:

Parameters forwarded to Web Dynpro -> *

WDWebContextAdapter.getWebContextAdapter().getRequestParameter("CKey")

Cheers!

Stefan

Answers (1)

Answers (1)

Former Member
0 Kudos

Try

WDWebContextAdapter.getWebContextAdapter().getRequestParameter(key)

See <a href="https://media.sdn.sap.com/javadocs/NW04/SPS15/wd/com/sap/tc/webdynpro/services/sal/adapter/api/IWDWebContextAdapter.html">Javadoc</a>.

Armin

Former Member
0 Kudos

Strange...

I guess (I)WDProtocolAdapter supercedes (I)WDWebContextAdapter in NW04s...

VS

stefan_bosshard2
Explorer
0 Kudos

Tried following calls - all of them returned null:

WDWebContextAdapter.getWebContextAdapter().getRequestParameter("CKey");
WDWebContextAdapter.getWebContextAdapter().getRequestParameter("Referer");

Any ideas?

How do I get the httpRequest?

Thanks.

SB

stefan_bosshard2
Explorer
0 Kudos

In which Jar File is the class WDProtocolAdapter available?

Our Problem is, Developer Studio and Netweaver have different versions - so I would like (as a workaround) to add this jar in developer studio....

Thanks

SB