on 07-17-2007 11:11 AM
Hi all,
In PDK we can track session using IPortalComponentrequest and httpsession. How do i implement the same for getting the session object in webdynpro.
My requirement is when a user logs in, his session is tracked and certain details get stored through the session object.When other applications require those details, they can access the same using the session object.
Lookin forward for some useful pointers
Thanks
HI,
To get all client session names, use this
for(int i=0;i<WDServerState.getActualClientSessions().length;i++)
{
msgMngr.reportWarning("Session "+WDServerState.getActualClientSessions()<i>);
}
Regards
Fahad Hamsa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
wdScopeUtil is helpful in passing data. It can be used instead of scope
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Priyanka,
Do you set value in Portal and read it from WebDynpro?
I have a situation here...
I want to open a Portal iView from WebDynpro do some processing and set some value in session or whatever and need to read these values somehow from WebDynpro.
I see that even though they give the same values if I get the session ID from Portal and WebDynpro, I'm not able to get the value that I set in session in Portal from WebDynpro...
Is there a way?
Thanks
JP
Hi JP,
My requirement was to read some data stored in the session object by some component by other components. If this is somewhat similar to your requirement, you can use the wdScopeUtil and its methods get() and put(). I was perfectly able to get the values stored in it using put across different webdynpro components. Do communicate if I got your problem right!!!
Hi Priyanka,
My requirement is quite different. I have the requirement of sharing data between Portal iView and a WebDynpro iView...They both run on the same Java Runtime/J2EE server.
When I get the sessionID from both, I'm able to get the same sessionID, but the data set in one (Portal iView) does not come in the other (WebDynpro App)...
Any idea?
Thanks.
JP
Add this com.sap.ep.applicationdevelopment jar to your application
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Priyanka,
Check this code
IScope scope = Utils.getCurrentClientSession().getScope();
in this scope u can set the values u want to pass to other applications like
scope.put("SCOPE_VAR1",scopevar1);
It will be a key value pair.
whereever u want to get the details from scope,
just call:
scope.get("SCOPE_VAR1");
regards
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks all for ur replies. But I need one more clarification.
Can getActualClientsessios() be used for preserving data values across applications?
By using the scope I would be able to pass data across applications . How do i capture session id using that?
Also, if I want to use IPortalComponentrequest object , which jarshould I import?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
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.