You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Rob Ward <rw...@paradata.com> on 2001/08/04 00:01:45 UTC
Failed login displays "Default.vm"
I'm trying to create my own Turbine application, and I'm having a problem
that was discussed earlier on this list: That is, if I do an incorrect
login, instead of displaying the template Login.vm, it uses the Default.vm
layout and doesn't display the Login page/screen.
I can't seem to find what the resoltion to this problem was (I searched the
mailing list archives) - could someone kindly enlighten me? I'm still trying
to figure out how it all works, so I imagine it is something simple that I
have overlooked but I'm out of ideas what it could be right now.
I am using the latest TDK2.1 release and Tomcat 3.2.3 as my servlet
container (which seems to be *really* slow to load the initial pages, I
dunno why, but that's a whole other story).
The problem happens both, in the sample application generated as per the
how-to and in an application I'm building myself. In my own application,
currently I only have two screen classes (Index.class, which is a do nothing
class that extends SecureScreen, which I basically copied from the sample).
Thanks in advance,
Rob
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
RE: Failed login displays "Default.vm"
Posted by Robert Fries <rg...@docmem.com>.
The problem with the layout (as detailed in a previous
message) is really a problem with the screen.
When the LoginUser action fails and sets the screen
template to "Login.vm", the page will use the template
service to try to find a "Login" screen, or a "Default"
screen to load.
Because there is no Login or Default screen class in
the sample app, it finds the Default screen in
org.apache.turbine.flux.modules.screens, which is
based on a class that we don't really want to use
while logged out of the sample app (FluxScreen).
I fixed this by creating the following Default.java
in the equivalent of org.mycompany.newapp.modules.screens:
--
package org.mycompany.newapp.modules.screens;
import org.apache.turbine.util.RunData;
import org.apache.velocity.context.Context;
public class Default extends SecureScreen
{
public void doBuildTemplate( RunData data, Context context )
{
}
}
--
This class is based on the sample app's SecureScreen, which
does what we want with the layout when logged out.
Also, I think you will find that the delay you are noticing
is your servlet container, which does a bunch of work when
it notices that your webapp has changed. It shouldn't happen unless
you change your webapp or restart your container.
Robert Fries
> -----Original Message-----
> From: Rob Ward [mailto:rward@paradata.com]
> Sent: Friday, August 03, 2001 6:02 PM
> To: turbine-user@jakarta.apache.org
> Subject: Failed login displays "Default.vm"
>
>
>
> I'm trying to create my own Turbine application, and I'm having a problem
> that was discussed earlier on this list: That is, if I do an incorrect
> login, instead of displaying the template Login.vm, it uses the Default.vm
> layout and doesn't display the Login page/screen.
>
> I can't seem to find what the resoltion to this problem was (I
> searched the
> mailing list archives) - could someone kindly enlighten me? I'm
> still trying
> to figure out how it all works, so I imagine it is something simple that I
> have overlooked but I'm out of ideas what it could be right now.
>
> I am using the latest TDK2.1 release and Tomcat 3.2.3 as my servlet
> container (which seems to be *really* slow to load the initial pages, I
> dunno why, but that's a whole other story).
>
> The problem happens both, in the sample application generated as per the
> how-to and in an application I'm building myself. In my own application,
> currently I only have two screen classes (Index.class, which is a
> do nothing
> class that extends SecureScreen, which I basically copied from
> the sample).
>
> Thanks in advance,
>
> Rob
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org