tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrei Tchijov <and...@tchijov.com>
Subject Re: Using RequestDispatcher.include() outside of Request/Response cycle.
Date Wed, 10 Oct 2007 04:44:49 GMT
Thnx for reply!  I thought that it should be possible. Was just  
looking for some pointers about which methods are important and which  
are not in Request/Response.


On Oct 9, 2007, at 10:34 PM, Lilianne E. Blaze wrote:

> Hello,
> Consider using either Request / Response Wrappers subclassed and
> modified so they simply return 0 / null / "" / ignore output, or  
> google
> for "servlet api mock objects" or something similar.
> Ages ago I wrote something similar, where specified pages were  
> called on
> webapp start / stop. Don't ask :/
> It was on Tomcat 4.0, but I believe there's nothing in the specs that
> prohibit such (ab)use, so it should work with any servlet container.
>
> Greetings, Lilianne E. Blaze
>
> Andrei Tchijov wrote:
>> Hi,
>>   I have a valve which detects some events in life-cycle of a web
>> application ( like successful login/failed login/logout ) and invokes
>> some configurable JSP page to let it perform some audit auctions (
>> like putting records in the table which trace access to application
>> ).  It works fine, the only problem is auditing session timeouts.  I
>> can (and do) add session listener, so it is not a problem to detect
>> that session timed out. The problem is how to invoke my audit JSP
>> page. RequestDispatcher.include() require Request and Response  
>> objects
>> which are obviously not accessible inside SessionEvent callback.
>> Should I create some sort of "fake" Request/Response objects? Can I
>> reuse some Request/Response objects from earlier (like when valve
>> detected creation of the session)?  Audit JSP page does NOT produce
>> any output and it does NOT require any information from Request, so
>> this Request/Response objects only need to be able to make
>> RequestDispatcher.include() happy.
>>   Your thoughts will be highly appreciated,
>>
>> Andrei Tchijov
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message