tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pete <pe...@gmx.org>
Subject Re: overriding handleStaleSessionException
Date Sat, 03 Sep 2005 12:38:42 GMT
HttpServletResponse.getOutputStream()

->  
http://jakarta.apache.org/tapestry/tapestry/hivedocs/service/tapestry.globals.HttpServletResponse.html



On Sat, 03 Sep 2005 11:32:56 +0200, Manjith Kumar Adapa  
<manjitha@aztec.soft.net> wrote:

> 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



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


Mime
View raw message