on 06-03-2009 5:25 PM
Greetings
On a webdypro application I have to check if the user has to change his password, and if so then I execute the
mutableAccount.setPasswordChangeRequired(true);
After doing this I want to logoff the user and send him to the login page so he can change his password.
Im trying with
WDClientUser.forceLogoffClientUser(null);
but I want it to go the login page. Im thinking about send it to the Application Url, but I would like to have it on a dynamic way, with a webdynpro function so I wont to hard code it.
Thanks in advance for your help
Jean Carlo
Hi Jean,
I am sure that you would be getting a logon page initially when you are launching your application. Just check what is the URL generated for your application. It would be something like this:
http://<Server_name>:<port>/webdynpro/dispatcher/<pacage_name>/<application_package>~<project_name>/<application_name>?SAPtestId=0
So where you are using this line of code WDClientUser.forceLogoffClientUser(null); try this code:
WDClientUser.forceLogoffClientUser("/webdynpro/dispatcher/<pacage_name>/<application_package>~<project_name>/<application_name>");
Which means you have to replace the null with the complete path of you application whih is after the port.
I hope this will solve your problem. Please revert back in case you have any further issue.
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.
I couldnt redirect to the password change page
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks for your answer, It was helpfull
ok this is what happens now:
The user logon and then I check that he must change his password and getsredirected to the login page.
Then the user put his logon information and then its redirected to the password change page.
This makes the user see the login page twice, one after another
Is there a way to redirect the user to the password change page directly?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This seems to work
try {
WDDeployableObjectPart deployableObjectPart =wdComponentAPI.getApplication().getDeployableObjectPart();
String urlToTargetApp =WDURLGenerator.getApplicationURL(deployableObjectPart);
WDClientUser.forceLogoffClientUser(urlToTargetApp);
wdComponentAPI.getMessageManager().reportSuccess("(IQX-urlToTargetApp:"+urlToTargetApp+")---");
} catch (WDURLException e) {
...
} catch (WDDeploymentException ex) {
...
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there a way of getting the generated Url of the application?
the project its gonna be on several servers and I rather getting it from a WD function
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jean,
Why do you exactly want that code for getting the application URL. You just need the path after the server location so you will never require the information regarding the servers.
No matter where you deploy this application, you will still be able to logoff from the applicationand return to the initial page.
I hope this solve the issue. Kindly revert back in case the issue is not resolved. Please close the thread and grant points if suggestion was helpful..
Thanks and Regards,
Pravesh
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.