just created:
https://issues.apache.org/jira/browse/TRINIDAD-943

-M
On Feb 8, 2008 2:06 PM, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:
> hey
>
> On Feb 8, 2008 2:01 PM,  <[EMAIL PROTECTED]> wrote:
> > Ok, thanks again Matthias :)
> >
> >  I will try it out and see if I can fix it that way soon..
> > perhaps I can provide sth. closer to a general solution ;)
>
> I am playing with a TimeoutConfigurator (via
> org.apache.myfaces.trinidad.config.Configurator)
> to check timeout for (non-)ppr requests.
>
> -M
>
>
> >
> > [EMAIL PROTECTED] schrieb: -----
> >
> > An: "MyFaces Discussion" <users@myfaces.apache.org>
> > Von: "Matthias Wessendorf" <[EMAIL PROTECTED]>
> > Gesendet von: [EMAIL PROTECTED]
> > Datum: 08.02.2008 01:47PM
> > Thema: Re: Re: Re: [Trinidad] problem with PPR behaviour after timeout
> >
> >
> > > > The problems that I then still have is to find out
> > > > a) how to recognize in the listener that it is a Trinidad PPR request
> > >
> > > the requestHeaderMap has a "Tr-XHR-Message" : true
> > > entry.
> > >
> > > The big problem in checking the Params before our TrinidadFilter is
> > > that you can't
> > > (due to issue in Servlet API) set the characterEncoding of the
> > > underlying request.
> >
> > meaning, if done a query against the param map setCharEncoding("utf-8");
> > is ignored.
> >
> > we set this encoding when creating the ExternalContexxtImpl
> >
> >
> > >
> > > TrinidadFilterImpl does that *before* checking "is this request a PPR
> > request"
> > >
> > >
> > >
> > > > b) when I write in the listener sth. like
> > > >    if i(sTrinidadRequest){
> > > >
> > request.getRequestDispatcher(SPECIAL_PPR_SESSION_TIMEOUT_PAGE).forward(request,response);
> >
> > > >   }
> > > >   How does the page (SPECIAL_PPR_SESSION_TIMEOUT_PAGE need to be built
> > to
> > > >   avoid those JS errors
> > >
> > > what we should do is sending a "ajax response", like:
> > >
> > > <?xml version="1.0" ?>
> > > <?Tr-XHR-Response-Type ?>
> > > <content>
> > > <script>alert("session time");</script>
> > > </content>
> > >
> > > Perhaps a bit smarter ;-)
> > >
> > > -Matthias
> > >
> > >
> > >
> > > >
> > > >    >>>"TypeError: a5 has no properties message=a5 has no properties"
> > > >    >>> "Invalid PPR response. The response-headers were:\nServer:
> > > >    >>> Apache-Coyote/1.1\nX-Powered-By: Servlet 2.4..."]"
> > > >
> > > >   ?
> > > >
> > > > Thanks so much,
> > > > Wolfgang.
> > > >
> > > > [EMAIL PROTECTED] schrieb: -----
> > > >
> > > > An: "MyFaces Discussion" <users@myfaces.apache.org>
> > > > Von: "Matthias Wessendorf" <[EMAIL PROTECTED]>
> > > > Gesendet von: [EMAIL PROTECTED]
> > > > Datum: 08.02.2008 12:32PM
> > > > Thema: Re: Re: [Trinidad] problem with PPR behaviour after timeout
> > > >
> > > >
> > > > at the moment I sent it, I saw that the redirect might be handled by
> > > > trinidad itself.
> > > >
> > > > A worth enhancement, IMO
> > > >
> > > > -M
> > > >
> > > > 2008/2/8  <[EMAIL PROTECTED]>:
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Hi,
> > > > >
> > > > > I see. Well as I've said a full login form page is returned that does
> > not
> > > > > seem to fit in the scheme of what PPR expects
> > > > > as response. Thus I thought that I need to differentiate in the
> > listener
> > > > if
> > > > > it is a PPR request or a normal one.
> > > > >
> > > > > [EMAIL PROTECTED] schrieb: -----
> > > > >
> > > > > An: "MyFaces Discussion" <users@myfaces.apache.org>
> > > > > Von: "Matthias Wessendorf" <[EMAIL PROTECTED]>
> > > > > Gesendet von: [EMAIL PROTECTED]
> > > > > Datum: 08.02.2008 12:20PM
> > > > > Thema: Re: [Trinidad] problem with PPR behaviour after timeout
> > > > >
> > > > > like
> > > > >
> > > > > public class SessionListener implements Filter  {
> > > > >
> > > > >     /**
> > > > >     * session timeout page
> > > > >     */
> > > > >     private final String SESSION_TIMEOUT_PAGE = "sessionTimeout.jsp";
> > > > >
> > > > >     /**
> > > > >     * do filter method
> > > > >     * @param servlet request
> > > > >     * @param servlet response
> > > > >     * @param filter chain
> > > > >     */
> > > > >   public void doFilter(ServletRequest request, ServletResponse
> > > > > response, FilterChain chain)
> > > > >     throws ServletException, IOException {
> > > > >
> > > > >     // check session availability
> > > > >     if(null == ((HttpServletRequest) request).getSession(false)) {
> > > > >
> > > > >         // dispatch to session timeout page, due to the session is
> > not
> > > > > available
> > > > >
> > > >
> > request.getRequestDispatcher(SESSION_TIMEOUT_PAGE).forward(request,response);
> >
> > > >
> > > > >
> > > > >     } else {
> > > > >         chain.doFilter(request,response);
> > > > >     }
> > > > >   }
> > > > >
> > > > >   public void destroy() {/* nothing to do */}
> > > > >   public void init(FilterConfig arg0) throws ServletException {/*
> > > > > nothing to do */}
> > > > > }
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > On Feb 8, 2008 12:09 PM, Matthias Wessendorf <[EMAIL PROTECTED]>
> > wrote:
> > > > > > Hi,
> > > > > >
> > > > > > you mean like you have a page, with some PPR triggers (like button)
> > > > > > and after 40 minutes you click a button to finally see the JS
> > errors ?
> > > > > >
> > > > > > Have you tried to implement a session listener to redirect (to
> > > > > > start/login page) after timeout?
> > > > > >
> > > > > > -M
> > > > > >
> > > > > > 2008/2/8  <[EMAIL PROTECTED]>:
> > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Hi,
> > > > > > >
> > > > > > > Generally I wonder what the concept/design of PPR is when a
> > timeout
> > > > has
> > > > > > > occurred
> > > > > > > because the current default PPR behaviour does not fit in this
> > > > scenario
> > > > > and
> > > > > > > one gets
> > > > > > > an error, actually two JS errors
> > > > > > >
> > > > > > > "TypeError: a5 has no properties message=a5 has no properties"
> > > > > > > "Invalid PPR response. The response-headers were:\nServer:
> > > > > > > Apache-Coyote/1.1\nX-Powered-By: Servlet 2.4..."]"
> > > > > > >
> > > > > > > The reason is that in such a situation the server sends a
> > complete
> > > > > login
> > > > > > > page contrary to the specific
> > > > > > > PPR response that is expected.
> > > > > > >
> > > > > > > How can you deal with PPR in such a situation? Is there any
> > built-in
> > > > > > > design, if so which, if not,
> > > > > > > is there a regular Trinidad-based approach/workaround to dealing
> > with
> > > > > this
> > > > > > > scenario?
> > > > > > >
> > > > > > > Many thanks,Wolfgang.
> > > > > > >
> > > > > > > PTA Programmier-Technische Arbeiten GmbH
> > > > > > > Seckenheimer Str. 65-67, 68165 Mannheim
> > > > > > > Amtsgericht Mannheim, HRB 1139
> > > > > > > USt-IdNr.: DE 143 839 368
> > > > > > > Geschäftsführer:
> > > > > > > Dipl.-Ing. Peter Fischer
> > > > > > > Dr. Harald W. Busch
> > > > > > > Dipl.-Kfm. Knut Fischer
> > > > > > >
> > > > > > >
> > > > **********************************************************************
> > > > > > > http://www.pta.de
> > > > > > > Mit 1547 Erfahrungsberichten aus 39 Jahren erfolgreicher
> > > > Projektarbeit!
> > > > > > >
> > > > **********************************************************************
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Matthias Wessendorf
> > > > > >
> > > > > > further stuff:
> > > > > > blog: http://matthiaswessendorf.wordpress.com/
> > > > > > sessions: http://www.slideshare.net/mwessendorf
> > > > > > mail: matzew-at-apache-dot-org
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Matthias Wessendorf
> > > > >
> > > > > further stuff:
> > > > > blog: http://matthiaswessendorf.wordpress.com/
> > > > > sessions: http://www.slideshare.net/mwessendorf
> > > > > mail: matzew-at-apache-dot-org
> > > > >
> > > > >
> > > > > PTA Programmier-Technische Arbeiten GmbH
> > > > > Seckenheimer Str. 65-67, 68165 Mannheim
> > > > > Amtsgericht Mannheim, HRB 1139
> > > > > USt-IdNr.: DE 143 839 368
> > > > > Geschäftsführer:
> > > > > Dipl.-Ing. Peter Fischer
> > > > > Dr. Harald W. Busch
> > > > > Dipl.-Kfm. Knut Fischer
> > > > >
> > > > >
> > **********************************************************************
> > > > > http://www.pta.de
> > > > > Mit 1547 Erfahrungsberichten aus 39 Jahren erfolgreicher
> > Projektarbeit!
> > > > >
> > **********************************************************************
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Matthias Wessendorf
> > > >
> > > > further stuff:
> > > > blog: http://matthiaswessendorf.wordpress.com/
> > > > sessions: http://www.slideshare.net/mwessendorf
> > > > mail: matzew-at-apache-dot-org
> > > >
> > > >
> > > > PTA Programmier-Technische Arbeiten GmbH
> > > > Seckenheimer Str. 65-67, 68165 Mannheim
> > > > Amtsgericht Mannheim, HRB 1139
> > > > USt-IdNr.: DE 143 839 368
> > > > Geschäftsführer:
> > > > Dipl.-Ing. Peter Fischer
> > > > Dr. Harald W. Busch
> > > > Dipl.-Kfm. Knut Fischer
> > > >
> > > > **********************************************************************
> > > > http://www.pta.de
> > > > Mit 1547 Erfahrungsberichten aus 39 Jahren erfolgreicher Projektarbeit!
> > > > **********************************************************************
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > >
> > > Matthias Wessendorf
> > >
> > > further stuff:
> > > blog: http://matthiaswessendorf.wordpress.com/
> > > sessions: http://www.slideshare.net/mwessendorf
> > > mail: matzew-at-apache-dot-org
> > >
> >
> >
> >
> > --
> > Matthias Wessendorf
> >
> > further stuff:
> > blog: http://matthiaswessendorf.wordpress.com/
> > sessions: http://www.slideshare.net/mwessendorf
> > mail: matzew-at-apache-dot-org
> >
> >
> > PTA Programmier-Technische Arbeiten GmbH
> > Seckenheimer Str. 65-67, 68165 Mannheim
> > Amtsgericht Mannheim, HRB 1139
> > USt-IdNr.: DE 143 839 368
> > Geschäftsführer:
> > Dipl.-Ing. Peter Fischer
> > Dr. Harald W. Busch
> > Dipl.-Kfm. Knut Fischer
> >
> > **********************************************************************
> > http://www.pta.de
> > Mit 1547 Erfahrungsberichten aus 39 Jahren erfolgreicher Projektarbeit!
> > **********************************************************************
> >
> >
>
>
>
> --
>
> Matthias Wessendorf
>
> further stuff:
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> mail: matzew-at-apache-dot-org
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

Reply via email to