// shall I write some keywords here to boost search engine ranking?

Sunday, August 21, 2005

Dirty Trick with Servlet Filter

As the name imply, Servlet Filter is a filter that can modify request before it is process by Servlet and modify response generated by Servlet before serve to client. As you might guess, it is implementing the Decorator pattern.

I had once struggle with the combination of JSP + Crystal Report + MS SQL Server. The details can be found in the Question I have post in the Expert Exchange. The moral behind this story is: Never use View as Crystal Report's Data Source!!!

But as in the question, there is still one more problem can't be resolve, the last page do not work. After a few head crashing trial and error, error and trial......I still cant fixed it.

Then a genius idea popup in my mind >> Servlet Filter. Both my 6th sense and logical thinking tell me that it can solve my problem. And I have post another quesion on Expert Exchange to get help.

And finally successfully hide the first page and last page button from the report generated. It is by using a Servlet Filter to remove all HTML code of these button that is generated by Crystal Report.

Basically, it do not solve my last page problem, but if the problem is not realise by end user, it means no problem. (Or at least, not my problem......)

1 comment:

Leongz said...

Crystal Report.. i had been told that Jasper Report was Open Source thingy uses to fight Crystal ! :D