Quoting myself:
>
> Most recently I am experiencing problems attempting to modify
> the login process. In newapp an incorrect login switches from
> the Login.vm layout to the Default.vm layout (undesirable
> behaviour) and a correct login takes you to the screen Index.vm
> with the layout Default.vm (desirable behaviour). Gary Murphy
> indicated that the switch back to the Default.vm layout for
> incorrect logins is "deep in the Flux" but that unfortunately the
> solution (or at least the reason for the switch) is lost in the mists
> of time. I have actually cloned newapp to myapp for my
> modifications, but somehow, with no modification to
> TR.properties the behaviour is strangely different in that a
> correct login now leaves me on the Login.vm screen with the
> Login.vm template instead of switching me to Index.vm - i.e.
> I have lost the desirable behaviour above. I have confirmed
> that my login has been accepted -
> $data.getUser().getFirstName() in the DefaultTop.vm
> navigation displays the appropriate value.
The change in behaviour was caused by me stuffing up the
initial entry in TURBINE_USER_GROUP_ROLE. Eventually
SecureScreen.isAuthorised() throws me back to Login.vm
because I didn't have the required turbine_root role.
With regards to the undesirable behaviour, I think this is a bug
in org.apache.turbine.modules.actions.LoginUser.java.
I think it needs a change something like:
if (loginTemplate != null && loginTemplate.length() > 0)
{
//data.setScreenTemplate(loginTemplate);
data.setLayoutTemplate(loginTemplate);
}
else
{
//data.setScreen(TurbineResources.getString(
data.setScreenTemplate(TurbineResources.getString(
TurbineConstants.SCREEN_LOGIN));
}
But I am not 100% sure as I am not totally happy with
my understanding of the various methods for setting
screens and templates.
> Introducing my own LoginUser class with:
>
> data.setScreenTemplate(TurbineResources.getString(
> TurbineConstants.TEMPLATE_HOMEPAGE));
>
> at the end of doPerform() (where template.homepage is
> defined as /Index.vm in TR.properties) makes no difference.
This was the same problem as above.
> One last problem. When I shutdown tomcat, I get a bunch
> (5 to be exact) of exceptions like this one:
>
> [Tue Jun 19 23:41:59 GMT+10:00 2001] -- ERROR -- TurbineUser.valueUnbobund(): Failed
>to save user object
> [Tue Jun 19 23:41:59 GMT+10:00 2001] -- ERROR --
> Exception: org.apache.turbine.util.security.DataBackendException: Failed to save
>user object
> Stack Trace follows:
> java.lang.NullPointerException
> at org.apache.turbine.om.peer.BasePeer.doUpdate(BasePeer.java:1635)
> at org.apache.turbine.om.peer.BasePeer.doUpdate(BasePeer.java:1578)
... -- SNIP ---
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:196)
>
> Again, anyone have any clues as to what the problem might be?
I am pretty sure this is a side effect of the Catalina bug that Jon
Stevens chased down (thanks Jon).
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]