cancel
Showing results for 
Search instead for 
Did you mean: 

webdynpro logon screen

Former Member
0 Kudos

I am developing a custom logon screen with a webdynpro iview.

From webdynpro, upon successfull logon to portal, I could not transfer the user context to the portal default launcher.

Can you help?

======== code ========

request.setAttribute("j_user", username);

request.setAttribute("j_password", password);

request.setAttribute("login_submit", "on");

ILogonAuthentication ua = UMFactory.getLogonAuthenticator();

try{

Subject subj = ua.logon(request, response, "uidpwdlogon" );

String forwardUrl = "http://teacup:50000/irj/servlet/prt/portal/prtroot/" +

"com.sap.portal.navigation.portallauncher.default";

// logon success, so forward to launcher.

response.sendRedirect(forwardUrl);

}catch(...) {

...//logon failure code

}

Obviously, the request object is not getting passed in the redirect call.

The above logic launches the default login screen instead of the user's home page and worksets.

if I try with the PrintWriter object, creating a dynamic page (as shown below)

an exception is thrown as:

'PrintWriter out' is already in use as 'getWriter' it was locked by 'PrintWriter.getWriter' .

request.setAttribute("j_user", username);

request.setAttribute("j_password", password);

request.setAttribute("login_submit", "on");

ILogonAuthentication ua = UMFactory.getLogonAuthenticator();

try{

Subject subj = ua.logon(request, response, "uidpwdlogon" );

String outStr = "<head><meta http-equiv=\"refresh\" content=\"0; "

+ "URL=http://teacup:50000/irj/servlet/prt/portal/prtroot/"

+ "com.sap.portal.navigation.portallauncher.default"

+ "\"></head>";

// logon success

PrintWriter out = response.getWriter();

out.println(outStr);

}catch(...) {

...//logon failure code

}

PS:

Please note I am getting the request and response objects as:

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

HttpServletResponse response = ((IWebContextAdapter) WDWebContextAdapter.getWebContextAdapter()).getHttpServletResponse();

Accepted Solutions (0)

Answers (4)

Answers (4)

kai_unewisse3
Active Contributor
0 Kudos

The problem is that the ACL permission for that module is not set to "anonymous" as the default login page.

Thanks,

Kai

Former Member
0 Kudos

The custom login development explains that you can use any custom developed iView and replace it with the default login page.

The default login page uses dynPro iview.

The reason we are developing webDynpro iview is that you do not need to code the view, (embedding frames and html code inside like the dynPro ).

cAn you suggest any alternatives?

The context is not getting into the irj servlet from webdynpro .

Message was edited by: Fazil Osman

Former Member
0 Kudos

Hi, Did you find the way to log the user to the portal, to pass the parameteres through the request? I have the same requirement. Thanks in advanced.

Regards.

Former Member
0 Kudos

Hi Fazil

Generally it is other way. You login to portal and navigate to webdynpro iviews. Let us know your actual requirement so that we can guide you.

Regards

NagaKishore V

Former Member
0 Kudos

Hi

Why are you trying to login to Portal from WebDynpro. I mean what is your exact requirement. All the WebDynpro iViews are created within the Portal. So to access a iView u need to log on to the portal. But you are saying something like accessing the portal page from a WebDynpro iView which i am not able to follow. Can you let me know the exact requirement so that we can suggest a way.

regards

ravi