You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by "irvin.belloni" <ir...@gmail.com> on 2011/10/21 10:33:21 UTC

Login portlet - access request or session context

I'm using jetspeed 2.2.1 and its login portlet.
When the user inputs a wrong login or password, he's being denied access and
a error message is displayed.
So far, so good.
When refreshing the page, we expect the message to disappear and the login
page to go back to its normal state. But the error message persists.

Being a jetspeed portlet i have no access to the controller, i can only
handle action via the jsp file.
To retrieve the error code, we use

<c_rt:set var="errorCode"
value="<%=((RequestContext)request.getAttribute(RequestContext.REQUEST_PORTALENV)).getSessionAttribute(LoginConstants.ERRORCODE)%>"/>

Is there any way to unset this error code from the jsp file so that when the
pasge is refreshed, we won't see the error message any more.
-- 
View this message in context: http://old.nabble.com/Login-portlet---access-request-or-session-context-tp32694770p32694770.html
Sent from the Jetspeed - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Login portlet - access request or session context

Posted by David Taylor <da...@gmail.com>.
Testing on 2.2.2, I see the same behavior. Looks like the error code
isn't cleared until successful login, and that its put in the session
of the guest user. I believe its put there because of a redirect on
login (instead of using a more appropriate request attribute). You are
not supposed to have access to the portal session from a portlet,
however take a look at the portlet request, there is a request context
attribute available, RequestContext.REQUEST_PORTALENV, returning a
RequestContext, which has getSessionAttribute and setSessionAttibute
methods

On Fri, Oct 21, 2011 at 1:33 AM, irvin.belloni <ir...@gmail.com> wrote:
>
> I'm using jetspeed 2.2.1 and its login portlet.
> When the user inputs a wrong login or password, he's being denied access and
> a error message is displayed.
> So far, so good.
> When refreshing the page, we expect the message to disappear and the login
> page to go back to its normal state. But the error message persists.
>
> Being a jetspeed portlet i have no access to the controller, i can only
> handle action via the jsp file.
> To retrieve the error code, we use
>
> <c_rt:set var="errorCode"
> value="<%=((RequestContext)request.getAttribute(RequestContext.REQUEST_PORTALENV)).getSessionAttribute(LoginConstants.ERRORCODE)%>"/>
>
> Is there any way to unset this error code from the jsp file so that when the
> pasge is refreshed, we won't see the error message any more.
> --
> View this message in context: http://old.nabble.com/Login-portlet---access-request-or-session-context-tp32694770p32694770.html
> Sent from the Jetspeed - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>



-- 
David

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org