On 27/08/2012 08:17, rathinasamy....@snovabits.net wrote: > Hi, > > Many thanks for your reply. > > I am asking something which should be done in apache tomcat configurations, > Since I have not able to control that maxtry concept through my application > (it is out of my app control)
There's no Tomcat or Servlet config to do this. > Through my app just generate a url to access a video file at run time, & may > be the user can copy that url and paste it in outside browsers - here I have > to control > the usage of using my url which I have given to the user. If your app is generating the URL, why can't it also be responsible for removing it? > That url is something looks like > (http://localhost:8080/Club/dely/ios/item/42/23/cc.mp4) & it should accessed > via apache tomcat, so I am asking here for anyway to > expire the url path in apache tomcat using filters > > like: > > <init-param> > <param-name>ExpiresByType image</param-name> > <param-value>access plus 2 minutes</param-value> > </init-param> > <init-param> > > But it expires image & after 2 minutes, I need to expires some url pattern > after 2 access. > > Thank you again for spending your time in this. Write a filter that blocks that URL after 3 accesses or 2 minutes (perhaps using the suggestion by Joseph). p > Regards, > Rathinasamy. > > > On 8/27/2012 12:34 PM, Joseph wrote: >> Have u tried to use regex to filter URL ,use concurrent hash map and atomic >> int to count? >> >> 在 2012-8-27,13:30,"rathinasamy....@snovabits.net" >> <rathinasamy....@snovabits.net> 写道: >> >>> Hi everyone, >>> >>> Please give me some ideas to achieve maxtry concept. >>> >>> I want to destroy the url path after some amount of access. >>> >>> For eg., if I give maxtry = 2 for the run time generated url >>> (http://localhost:8080/Club/dely/ios/item/42/23/cc.mp4), After the two >>> times access of the above url for the third time that url path will not be >>> able to access for anyone. >>> >>> _My environment is:_ >>> >>> Apache-tomcat-7.0.25* >>> *Windows 7 >>> 32 bit Operating system >>> >>> How to achieve this using apache filter? >>> >>> Thanks in advance, >>> Rathinasamy. >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > -- [key:62590808]
signature.asc
Description: OpenPGP digital signature