Discussions

Web tier: servlets, JSP, Web frameworks: Using tiles - servlet filter called multiple times

  1. Using tiles - servlet filter called multiple times (2 messages)

    Hi I have an application in we have 7 filters defined. Now in a jsp page, I have a loop that inserts a TILE. The loop iterates about 7000 times. Every time the tile insert is called, even my filters are called. So my 7 filters are called 7000 times. Now this makes my page rendering really slow. setting flush="false" (in the tile insert) does not work setting buffer="2700k" autoFlush="false" does not work. I have to use tiles. I cant skip the filters. What do I do? Is there any way I can not call the filter when my tiles are inserted.
  2. One obvious way is that inside the servlet filter you can ignore the tile jsps.... 7000times looping in any case will slow down the jsp without filters also... It is kind of interesting to question why you are looping 7000 times...can't think of a scenario...but i am sure you are knowledgeable about it-))...kind of cool but not kind of smart-))... Bhagvan K http://www.jroller.com/page/bhagvank
  3. Its not actually looping 7000 times, but to make the problem simpler for users to understand I gave a similar description to my problem. Basically my problem is that every piece of data that is displayed on my page is displayed using a tiles. There are around 700 rows being dispalyed, and each row has 10 columns (thus the figure 7000). I want the filters to be invoked for jsp pages - but not for each tile inside the jsp. If I replace the tile inserts with out.println() calls, the filters are not called and page peformance increases dramatically. To further complicate matters, there is a chain of 7 filters. Dont ask me why - thats how the application is. I did not write it. I cannot apply pagination because the business users want to see everything on one page. I hope you got a gist of my problem.