This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Filters are called for every request made to the filtered resource - that is their purpose, there is no way to declaretively specify a filter for the first request by a client and ignore all others. The logic you write in your filter can do what it likes though.
Could you just set a session attribute as an indicator that the filter has been executed for this user's session. If it's not present, execute the filter code, set the value then continue on. If the session value is present this session must have already executed so short-circuit any processing and just continue.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: How to make Filter getting called only once for every User