cancel
Showing results for 
Search instead for 
Did you mean: 

Redirect in a logon page

Former Member
0 Kudos

Hello experts!

I am changing the whole structure of the logon page in Portal.

One of the requirements is to have in the header the possibility of changing the language by clicking in it, as you can see above:

PT | EN

My idea to implement this functionality was to redirect the user to a page (setlang.jsp=lang=XX) where XX is the language intended by the user.

Well, first my problem was to be able to link to the setlang.jsp, having this file in the same page than umLogonPage.jsp...

I couldn't done that, so i put the file into dist folder and included the file in the end of the umlogonpage.jsp(didn't know why that's relevant, but worked).

Now i can link to the file successfully... My intention is to store the language in a session variable, and redirect to umlogonpage.jsp... but i am having difficult with that...

here is the code of the setlang.jsp:

<%

// your default language.

String default_language = "pt";

if( "pt".equals( request.getParameter( "lang" ) ) || "en".equals( request.getParameter( "lang" ) ) )

{

session.setAttribute( "lang", request.getParameter( "lang" ) );

out.print(request.getContextPath());

// response.sendRedirect( request.getContextPath() );

response.sendRedirect( '/irj/portal' );

}

else

{

session.setAttribute( "lang", default_language );

}

%>

Is there a easy way to do that?

am i doing this the wrong way?

Thanks in advance!

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

anyone ? =/

former_member182598
Active Contributor
0 Kudos

hi,

you can just append

http://<host:port>/irj/portal?ume.logon.locale=fr

for french for example.

but note that once the logon becomes successful this parameter will get overwritten.

What exactly you are trying to achieve?

Thanks

Prashant