cancel
Showing results for 
Search instead for 
Did you mean: 

Use HTTP Session to pass Object from Web Dynpro for Java to JSP page

Former Member
0 Kudos

Is it possible to get a handle on the HTTP Session object from within a Web Dynpro application? I want to place a Java object in there that can be retrieved by a JSP page.

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

I do not believe the session is available in the WD framework.

You may want to look into portal eventing to pass objects. Or create development component projects of each type and have these communicate

Good luck,

Roelof

Answers (1)

Answers (1)

sanyev
Active Participant
0 Kudos

Hi Tom Cole,

You can try this. i am not sure if this will work or not.

HttpServletRequest request = ((IWebContextAdapter) WDWebContextAdapter.getWebContextAdapter()).getHttpServletRequest();

You can also try this.

IWDRequest mm_request = WDProtocolAdapter.getProtocolAdapter().getRequestObject();
HttpServletRequest request = (HttpServletRequest)mm_request.getProtocolRequest();

IWDRequest basically wraps the HttpServletRequest. if you are using NW04s then the getProtocolRequest() may not be available.

Regards,

Sanyev

Former Member
0 Kudos

I wasn't able to get this to work. I think for now I will convert to a non Web Dynpro solution. There are just too many limitations for me on this particular project that make Dynpro not a good solution.

Thank you VERY much for your assistance.