on 05-19-2009 9:36 PM
Hi everyone,
How can I get the session Id in a Web dynpro App?
Regards,
Eduardo Campos.
Hi Eduardo,
just include the servlet.jar in your library (if it is not included).
then use the following code
HttpServletRequest request = ((IWebContextAdapter) WDWebContextAdapter.getWebContextAdapter()).getHttpServletRequest();
HttpSession session = request.getSession(true);
String sessionId = session.getId();
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Eduardo ,
Please try this code:
HttpServletRequest request = (HttpServletRequest) WDProtocolAdapter.getProtocolAdapter().getRequestObject().getProtocolRequest();
HttpSession session = request.getSession();
String sessionId = session.getId();
Also make sure that you include the servlet.jar in your libraries to get the object of HttpServletRequest.
I am sure this will help you. Please revert back in case you want any further information.
Thanks and Regards,
Pravesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.