This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Hi friends, In an interview, the interviewer asked me that he wants to hide a web page on every fridays. I replied that once if we know the Server date and checking the day == friday, we can redirect the page using response.sendRedirect option. But he was not happy with my anser. Is there any other possible solutions are available. Thanks & Regards, M.S.Raman
steve souza
Ranch Hand
Joined: Jun 26, 2002
Posts: 852
posted
0
His objection might have been that sendRedirect(...) makes the client have to make another http request to the server. include(...) or forward(...) would behave similarly, but the client wouldn't even know they had occurred behind the scenes. Servlet filters are also a nice place to put this type of behaviour especially if say more than one page had blocked access on fridays. That way you put the logic in the filter and you don't have to change the servlet code. steve - http://www.jamonapi.com - a fast, free, open source performance tuning api download at http://www.javaperformancetuning.com/tools/jamon/#DownloadingJAMon
And after I had replied to the other duplicate post. Please refrain from posting the same post twice. Thanks I am closing the other thread, since I like the answer here better. Mark
Originally posted by steve souza: His objection might have been that sendRedirect(...) makes the client have to make another http request to the server. include(...) or forward(...) would behave similarly, but the client wouldn't even know they had occurred behind the scenes. Servlet filters are also a nice place to put this type of behaviour especially if say more than one page had blocked access on fridays. That way you put the logic in the filter and you don't have to change the servlet code. steve - http://www.jamonapi.com - a fast, free, open source performance tuning api download at http://www.javaperformancetuning.com/tools/jamon/#DownloadingJAMon
Thanks Steve. - M.S.Raman
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: How to hide a particular web page on all friday's