cancel
Showing results for 
Search instead for 
Did you mean: 

Reading HTTP Request Header Variables

Former Member
0 Kudos

I am trying to read HTTP Request Header Variables from my Web DynPro application. In JSP, it's really simple - something like <% request.getHeader("variable name"); %>

I saw some posts here, but I can't find methods like

.getHttpServletRequest();

.getProtocolRequest();

I am using NWDS 7.0.15. Please help!

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

IWDProtocolAdapter protocolAdapter = WDProtocolAdapter.getProtocolAdapter();

IWDRequest request = protocolAdapter.getRequestObject();

String text = request.getParameter("<parameterName>");

Hope this helps.

Former Member
0 Kudos

I have this code, but it didn't work. I think I read it only works for URL parameters. Am I doing something wrong?

former_member185086
Active Contributor
0 Kudos

Hi

Try this [thread|] might helpful for you.

Best Regards

Satish Kumar

Former Member
0 Kudos

Hey Satish,

Thank you for the thread link. This is where I found the code that Srinivas provided, but it doesn't seem to read the HTTP request header variables. I just get "null" when I get the actual values when opening a JSP in the same domain.

Have you gotten this code to work?

Former Member
0 Kudos

The only header I get is sap-ep-version, but I am referencing my WD application via iView.

When I access my WD app via URL, then it doesn't have any HTTP headers.

I can pass in URL parameters, which is picked up as HTTP headers. For security reasons, I would rather not send information as URL parameters.

I am guessing the code above is for URL parameters. Is there an option/configuration I am missing here?