Hi,

A Dilluns 14 Octubre 2002 16:44, Heligon Sandra va escriure:
> I only have to not cast the result of the findForwardConfig method ?
>

No, you have to change the call to processActionForward for 
processForwardConfig. The  TilesRequestProcessor overwrites 
processForwardConfig to look for tiles definitions.


> Sandra
>
> -----Original Message-----
> From: Antoni Reus [mailto:[EMAIL PROTECTED]]
> Sent: 14 October 2002 16:39
> To: Struts Users Mailing List
> Subject: Re: Tiles - Forward problem
>
>
> Hi,
>
> A Dilluns 14 Octubre 2002 10:59, Heligon Sandra va escriure:
> > I have overridden the TilesREquestProcessor in order to test
> >     if a user is authenticated for each request, but it doesn't work:
> >
> >     protected boolean processPreprocess(HttpServletRequest request,
> > HttpServletResponse response)
> >     {
> >         // Get the session object
> >         HttpSession session = request.getSession();
> >
> >         try{
> >
> >           // Test if the request is a login request
> >           String path = processPath(request, response);
> >           if ( !path.equals((String) "/login") )
> >           {
> >             // If not a login page, test if the user is authenticated on
> > the application server
> >             User userInfo =
> > (User)session.getAttribute(Constants.USER_KEY);
> >
> >             if ( userInfo == null ||
> >               (userInfo != null && userInfo.getSessionId() == 0) )
> >             {
>
> Change this:
> >                     processActionForward(request, response,
> >
> > (ActionForward)appConfig.findForwardConfig("login"));
>
> for this:
>
>                        processForwardConfig(request, response,
>                               appConfig.findForwardConfig("login"));
>
> >             }
> >           }
> >         }
> >         // if a servlet exception occurs
> >         catch (ServletException ex)
> >         {
> >         }
> >         //if an input/output error occurs
> >         catch (IOException ex)
> >         {
> >         }
> >         return true;
> >     }


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

Reply via email to