This is what I did

public class MyFilter implements WebRequestServicerFilter{
public void service(WebRequest request, WebResponse response, WebRequestServicer servicer)
           throws IOException
   {
try
       {
             //do whatever u want
            servicer.service(request, response);
       }
       finally
       {
            //do whatever u want
       }
   }

}

In hivemodule.xml add the following

<service-point id="MyFilter" interface="org.apache.tapestry.services.WebRequestServicerFilter"> Filter used to optionally discard the session at the end of a request (typically after a logout). <invoke-factory>
           <construct class="MyFilter">
           </construct>
       </invoke-factory>
</service-point>

Hope it helps.
Thanks,
Pratibha

Malin Ljungh wrote:

Hi all,

I have tried to implement a Servlet Filter but my Tapestry 4 app will not
take it... I get some weird errors - is it not supposed to work?

I have also read about the ServletRequestServicerFilter but I cannot find
any decent documentation - is there any? ... I lack documentation about many
things - where is the best way to go anyway?

What I'm really trying to do is to manage my Hibernate transactions, I'd
like to have one transaction per HTTP request. So I thought I'd do it like a
servlet filter - is this the wrong way?
Then I thought maybe I could use my border component which wraps all pages -
would that be possible? Better?

Any help appreciated.

Malin



------------------------------DISCLAIMER------------------------------
This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity.

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

Reply via email to