tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manjith Kumar Adapa <manji...@aztec.soft.net>
Subject RE: overriding handleStaleSessionException
Date Sat, 03 Sep 2005 09:32:56 GMT
Hi,

Tapestry 4.0 does not have the following class:-

org.apache.tapestry.request.ResponseOutputStream;

can sbdy suggest me the alternative class to generate the outputstream.


Thanks
Manjith 






-----Original Message-----
From: Andrei Stroescu [mailto:andrei@ime.ro] 
Sent: Thursday, September 01, 2005 5:08 PM
To: Tapestry users
Subject: Re: overriding handleStaleSessionException

Ok!
I made what are you tell me to do but I don't realy know how to 
implement this.
My java class extends BasePage already and implements PageRenderListener
I saw an example (VLIB) from tapestry 4 package but I didn't undersand 
how it works.

I made class MyEngine.java

package app.web;


import java.io.IOException;
import org.apache.tapestry.IRequestCycle;
import org.apache.tapestry.StaleSessionException;
import org.apache.tapestry.event.PageEvent;
import org.apache.tapestry.event.PageRenderListener;
import org.apache.tapestry.html.BasePage;
import org.apache.tapestry.request.ResponseOutputStream;
import org.apache.tapestry.form.*;
import org.apache.tapestry.engine.BaseEngine;
import org.apache.tapestry.form.IPropertySelectionModel;
import javax.servlet.ServletException;

public class MyEngine extends BaseEngine
{
    private void handleStaleSessionException(StaleSessionException ex, 
IRequestCycle cycle, ResponseOutputStream output) throws IOException, 
ServletException
                 {
                 System.out.println("StaleSessionException!");
                 MeniuCautare search= (MeniuCautare) 
cycle.getPage("MeniuCautare");
                 cycle.activate(search);
                 renderResponse(cycle, output);
              }

 
}

How should I implement this class in my application ?

Thank you




Kent Tong wrote:

>Andrei Stroescu <andrei <at> ime.ro> writes:
>
>  
>
>>I tried to override handleStaleSessionException in my Own Class that 
>>excends BasePage but dindn't work.
>>    
>>
>
>You need to extend BaseEngine, not BasePage.
>
>  
>
>>this is overriding method:
>>
>>private void handleStaleSessionException(StaleSessionException ex, 
>>IRequestCycle cycle, ResponseOutputStream output) throws IOException, 
>>ServletException
>>    {
>>
>>    System.out.println("StaleSessionException!");
>>   SearchM search= (SearchM) cycle.getPage("SearchM");
>>    cycle.activate(search);
>>
>>    }
>>    
>>
>
>Try:
>private void handleStaleSessionException(StaleSessionException ex, 
> IRequestCycle cycle, ResponseOutputStream output) throws IOException, 
> ServletException
>     {
>     System.out.println("StaleSessionException!");
>     SearchM search= (SearchM) cycle.getPage("SearchM");
>     cycle.activate(search);
>     renderResponse(cycle, output);
>  }
>
>--
>Author of e-book for learning Tapestry (www.agileskills2.org/EWDT)
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>  
>


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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message