Hi,
My list is small only 5 URLS, 
I save it in (String[]), that load in the Filter init method by init
parameter in the web.xml.
Every request i take the ServletPath and to this part in function,

boolean bRunURL;

for(int i = 0, max = sArrAlowd.length; i < max && !bRunURL; i++)
    bRunURL = (sServletPath.indexOf(sArrAlowd[i],1) == 1);

return bRunURL;

U think is ok ?


Tim Funk wrote:
> 
> If your allowed list check is small and simple (and NOT synchronized) - 
> the performance impact is probably not noticeable.
> 
> If your list of URLS is large - then your check would be based on your 
> check algorithm. (http://en.wikipedia.org/wiki/Big_O_notation)
> 
> -Tim
> 
> prt wrote:
>> Hi to all again,
>> 
>> I added filter object for all requests  <url-pattern>/*</url-pattern>.
>> In the Filter class i check the ServletPath
>> (HttpServletRequest.getServletPath()) and
>> i check if is equals to alist of allowd paths. it is work just perfect.
>> But i think that is damage the performance, is it ?
>> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Servlet-Filtering---performance..-tf3356429.html#a9335687
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
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