]
Minh Hoang TO updated GTNPORTAL-1939:
-------------------------------------
Assignee: Minh Hoang TO
PortalContainer#getInstance() must not set the
DEFAULT_PORTAL_CONTAINER_NAME "portal"
-------------------------------------------------------------------------------------
Key: GTNPORTAL-1939
URL:
https://issues.jboss.org/browse/GTNPORTAL-1939
Project: GateIn Portal
Issue Type: Quality Risk
Security Level: Public(Everyone can see)
Components: Common integration
Affects Versions: 3.1.0-GA
Environment: Doesn't matter
Reporter: Michael Hauer
Assignee: Minh Hoang TO
Labels: portal-s56
The problem we were facing is very curious:
While porting our app from jboss 4.3 (plus portal) to jboss 5.1 epp (GateIn), I was
facing a problem with the login.jsp which showed the following behaviour:
The first request (localhost/myportal/private/myportal) for login (InitiateLoginServlet)
displayed the correct login.jsp we have in our extension.
But after trying to login with invalid credentials I kept beeing redirected to the
login.jsp from the default portal.
I used at least 3 hours to debug the whole bunch of eXo classes (very hard, facing the
fact, that not all sources are shipped with the source zip file).
Then I realized the problem:
I implemented a custom Authenticator which extends OrganizationAuthenticatorImpl. There I
tried to put some Attributes to the current PortalContainer using
PortalContainer.getInstance().setAttribute("bla", "bla").
What I didn't know is, that this GETInstance sets the default portal if the current
container is null.
In general a getter is not intended to modify anything. Even considering situations where
this might make sense, I think this could cause lots of trouble.
I would expect an exception if there is no current container.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: