On Oct 22, 2008, at 10:35 AM, Nishant Mehta wrote:
Hello all,
I would like to know if in Jetspeed there is any way to redirect to a
portlet page after login based on url parameters. For example, the
user
arrives at the portal using a url like this:
http://portal.com/portal?param=value
and because he is not logged in he will be redirected to the login
page.
After logging in, I would like to redirect the user to a page on
another
portlet based on the url parameter. What is the best way I can
accomplish
this? I am using version 2.1.3 of the jetspeed portal.
Thanks.
There are actually different rules that are applied to locating the
page, based on the user. When the user is not logged on, the user is
considered to be the "guest" user. You can set up "profiling rules" to
locate pages for each user, including the guest user. Out of the box,
when a user is not logged on, and they visit the site, they are
presented with the default home page, where there is a login portlet.
If you wanted to redirect to another page, say with a single login
form, then setup a rule for the guest user to always hard-code
redirect to the login page, say /login.psml. This can be achieved
through the seed data, when you create your portal, with something like:
Profiling rule in j2-seed.xml:
<ProfilingRule id="redirectToLogin" standardRule="true">
<description value="The security profiling rule needed for
credential change requirements."/>
<Criteria>
<Criterion name="page">
<type value="hard.coded"/>
<value value="/login.psml"/>
<fallBackOrder value="0"/>
<fallBackType value="0"/>
</Criterion>
</Criteria>
</ProfilingRule>
User creation:
<User name="guest">
<Null/>
<roles>guest</roles>
<groups></groups>
<preferences/>
<userinfo/>
<Rules>
<Rule locator="page" rule="redirectToLogin"/>
</Rules>
</User>
or use the administrative portlets to configure the same thing at run
time.
Request-parameter can also be used as criteria in locating pages, see
the docs here:
http://portals.apache.org/jetspeed-2/guides/guide-profiler.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]