[Logo]
Forums Register Login
Unsure about this filter
Hi.
I have been reading LinkTrackerFilter class from "Servlets and JavaServer Pages� The J2EE� Technology Web Tier" book's source and some questions arised.
This class extracts a url from the query string then redirects the request to that url and then return statement appears.
At the end of the class, the code increases a static counter then there is a chain.doFilter( ).
The book emphases that the calling to the previous doFilter is important in order to allow other filters, servlets and JSP to handle the request.
Since the code the freely avaible, I will post some snipets here :

How the hell the last two lines would be getting called ? there is a return statement !
Did you look closely at the code? Is the return statement unconditionally always reached?
please buy my thing and then I'll have more money:
Thread Boost - a very different sort of advertising
https://coderanch.com/t/674455/Thread-Boost-feature


This thread has been viewed 397 times.

All times above are in ranch (not your local) time.
The current ranch time is
Apr 27, 2018 02:57:54.