Steve Davis wrote:

> The way I do it is to get the RunData object in the default.jsp
> and then check to see if the user is logged in.  If they are not
> then I show the Login screen. I.E
> 
> <%@ import page = "org.apache.turbine.util.RunData" %>
>    .
>    .
>    .
> <% RunData rdata = (RunData) request.getAttribute("rundata"); %>
> <% if ( rdata.getUser().hasLoggedIn() ) { %>
>       Do something
> <% } else { %>
>       get login screen
> <% } %>
> 
> -- Steve Davis
> 


The proper way is to write your own SessionValidator action which
requires login before displaying the home page (you can check out the
default Turbine sessionValidator as an example).

Template logic is bad ! Use actions for the controller part of MVC.
This is probably the main strength of Turbine.

--
Raphael Luta - [EMAIL PROTECTED]
Vivendi Universal Networks - Paris


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to