You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by sandeepraj singh <sa...@atosorigin.com> on 2009/12/09 12:28:55 UTC

Re: Login Filter,

Hi Thiago,

I created my own AccessController dispatcher but i have entered into another
problem

One first access to any page, redirection to Login page happens but it is
without any stylesheet.

My order of configuration is  
configuration.add(
                "AccessController", accessController,
                "before:RootPath,before:ComponentEvent, before:PageRender,
after:Asset,after:VirtualAsset");


While accessing the Login page directly via url in the browser, there is no
problem of stylesheet

Any pointers?

Thanks
sandeep



Thiago H. de Paula Figueiredo wrote:
> 
> Em Thu, 26 Nov 2009 07:27:16 -0200, Juan E. Maya <ma...@gmail.com>  
> escreveu:
> 
>> or Tapestry-Spring-Security Integration
> 
> I don't recommend it because the checks are made in the setup render  
> event, *after* the activate (onActivate()) one. It does not cover action  
> requests, so I created my own one, Tapestry Security, not released yet.
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
> and instructor
> Owner, software architect and developer, Ars Machina Tecnologia da  
> Informação Ltda.
> http://www.arsmachina.com.br
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Login-Filter%2C-tp26525297p26708778.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Login Filter,

Posted by sandeepraj singh <sa...@atosorigin.com>.
Successfully created a filter inorder to avoid css problem,

public void contributePageRenderRequestHandler(
            OrderedConfiguration<PageRenderRequestFilter> configuration,
final ApplicationStateManager sessionManager,
            final RequestGlobals requestGlobals, final LinkSource
linkSource)
    {
        PageRenderRequestFilter loginFilter = new PageRenderRequestFilter()
            {
                public void handle(PageRenderRequestParameters parameters,
PageRenderRequestHandler handler) throws IOException
                {

                    LoginData loginData = null;

                    if
(!parameters.getLogicalPageName().equalsIgnoreCase("LoginPage"))
                    {
                        loginData =
sessionManager.getIfExists(LoginData.class);

                        if (loginData == null ||
!"testUser".equalsIgnoreCase(loginData.getUserName()))
                        {
                           
requestGlobals.getHTTPServletResponse().sendRedirect(
                                   
linkSource.createPageRenderLink("LoginPage", false).toRedirectURI());
                        }
                    }
                    handler.handle(parameters);
                }
            };

        configuration.add("LoginFilter", loginFilter);
    }

sandeepraj singh wrote:
> 
> Hi Thiago,
> 
> I created my own AccessController dispatcher but i have entered into
> another problem
> 
> One first access to any page, redirection to Login page happens but it is
> without any stylesheet.
> 
> My order of configuration is  
> configuration.add(
>                 "AccessController", accessController,
>                 "before:RootPath,before:ComponentEvent, before:PageRender,
> after:Asset,after:VirtualAsset");
> 
> 
> While accessing the Login page directly via url in the browser, there is
> no problem of stylesheet
> 
> Any pointers?
> 
> Thanks
> sandeep
> 
> 
> 
> Thiago H. de Paula Figueiredo wrote:
>> 
>> Em Thu, 26 Nov 2009 07:27:16 -0200, Juan E. Maya <ma...@gmail.com>  
>> escreveu:
>> 
>>> or Tapestry-Spring-Security Integration
>> 
>> I don't recommend it because the checks are made in the setup render  
>> event, *after* the activate (onActivate()) one. It does not cover action  
>> requests, so I created my own one, Tapestry Security, not released yet.
>> 
>> -- 
>> Thiago H. de Paula Figueiredo
>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
>> and instructor
>> Owner, software architect and developer, Ars Machina Tecnologia da  
>> Informação Ltda.
>> http://www.arsmachina.com.br
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Login-Filter%2C-tp26525297p26742769.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org