I believe you will have to acquire the ServletInfo from the (Action)servlet 
itself as in the example..
ServletInfo info = cyR.getRequestProcessor().servlet.getServletInfo();

In your Valve class:
public void invoke(request,response,valveContext) throws 
IOException,ServletException 
{
//main processing here 
 // now execute all other valves
    valveContext.invokeNext(request, response);
}

Anyone else ?
M-
*********************************************************************
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



----- Original Message ----- 
From: "Alexander Lazic" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Sunday, August 20, 2006 2:41 PM
Subject: Re: Valve && Connectors && Request-Objects


> On Sam 19.08.2006 21:40, Alexander Lazic wrote:
> 
>>I have seen a in 4.1.32
>>connectors/coyote/src/java/org/apache/coyote/RequestInfo.java which
>>have the infos but when i try to use this i get this error:
> 
> With help from Mark Thomas i have know a working CoyoteConnector, thanks
> you Mark ;-).
> 
> But kow i have another question and I'am not sure if i'am on the wrong
> way.
> 
> My setup now:
> 
> ---
> <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
>           protocolHandler="org.apache.jk.server.JkCoyoteHandler"
>           port="8009" enableLookups="false" 
>           connectionTimeout="0" debug="9"
>           useURIValidationHack="false"
>           protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler" />
> 
> .
> .
> <Engine ...
> <Valve className="LogData" prefix="LogData1-" suffix=".log"
> rotatable="true" />
> .
> .
> ---
> 
> and try to get out some infos from RequstInfo:
> 
> ---
>  org.apache.coyote.Request cyR = ((CoyoteRequest)request).getCoyoteRequest();
>  RequestInfo rqInf = cyR.getRequestProcessor();
> .
> .
> .
> log("==>>>rqInf.getRequestProcessingTime() 
> :"+rqInf.getRequestProcessingTime() +":\n",date);
> log("==>>>rqInf.getProcessingTime() :"+rqInf.getProcessingTime() +":\n",date);
> log("==>>>rqInf.getRequestCount() :" + rqInf.getRequestCount() +
>        >>>":\n",date);
> context.invokeNext(request, response);
> .
> .
> .
> result.append("RequestProcessingTime() :");
>     result.append(rqInf.getRequestProcessingTime());
>     result.append(": ProcessingTime() :");
>     result.append(rqInf.getProcessingTime());
>     result.append(": RequestCount() :");
>     result.append(rqInf.getRequestCount());
>     result.append(":");
> 
>     log(" result.toString() :" + result.toString(),date);
> ---
> 
> and i get for the first request 0, could this be a bug or do i
> understand the RequestInfo class wrong?!
> 
> Btw: i it possibel to get the info how many requests at the moment
>     tomcat currently handle?!
> 
> Thanks for help && regards
> 
> Alex
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

Reply via email to