Thank you very much André Warnier for your time.

Here I would like to use default webapp/servlet.

- add a filter to the default webapp, so that before letting the default servlet return a static file, it will take into account some kind of counter Can you give me some examples for how to add a filter in default webapp so that the default servlet will take a count every time when a click for the url?

On 8/28/2012 12:37 PM, André Warnier wrote:
rathinasamy....@snovabits.net wrote:
No, not bothering about the interuption. As of now if an order comes generate an url and return back with a maximum try for 2 times and time to live for 15 minutes.

Let`s restart this from the beginning.

1) Unless you have a specific webapp and a specific servlet configured to serve these URLs, Tomcat is going to serve them with its default webapp and default servlet, whose purpose is to serve static files stored in the filesystem. This default webapp/servlet does not count the number of times the file has been served, nor take into account the age of the file etc..

2) if you want a different behaviour for those static files, you can either a) add a filter to the default webapp, so that before letting the default servlet return a static file, it will take into account some kind of counter or timer, and take some action based on that (return a "not found" response, delete the file, whatever), before the default servlet runs and returns the file or b) create your own webapp/servlet that will return these files (or not) depending on your criteria. And then map this webapp/servlet to the appropriate URL sub-space (where your files are created to be downloaded).

Either way, there is no standard (Tomcat-included) servlet or servlet filter that does this, so you will have to write your own code. Is that part clear ?


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

Reply via email to