Hello,
i need a functionality to switch between different anonymous users. I found somtehing interesting on SDN.
I am new to Portal Application development and don't know what i have done wrong.
My ChangeUser.java looks like this:
import com.sapportals.portal.prt.component.*;
public class ChangeUser extends AbstractPortalComponent
{
public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
{
String guest_user = request.getParameter("guest_user");
String href="/irj/portal/anonymous
guest_user="+guest_user;
response.write("<scrip t>");
response.write("window.top.location.href=""+href+""");
response.write("</scrip t>");
}
}
Additionally i edited the portalapp.xml like this:
<?xml version="1.0" encoding="UTF-8"?>
<application>
<application-config/>
<components>
<component name="ChangeUser">
<component-config>
<property name="ClassName" value="ChangeUser"/>
<property name="AuthScheme" value="anonymous">
</property>
</component-config>
<component-profile/>
</component>
</components>
<services/>
</application>
Afterwards i deployed it and i can find in the dployments of the portal runtime.
So that is what i hvae done.
So this what i did for testing:
I access the portal via:.../irj/portal/anonymous
From this page i am just trying to edit the URL and access:
../irj/servlet/prt/portal/prtroot/ChangeUser.ChangeUser?logout_submit=true&guest_user=english
And what happens? I am getting redirected to the Portal Logon Page.
But if i understood the Blog right, i should getting logged in as english user.
Have i done something wrong?
Thanx for your helpful answers in advance:)
Marcus