HttpServletResponse#sendRedirect() doesnot work from servlet when the URL is rehitted/refreshed
posted 6 years ago
I am facing one problem.
My application is being invoked through one tool called CTI.
Based on the url hit one servlet get called every time. Then in that servlet based on the the parameter
I am creating faces url. And then using response#sendRedirect() i am redirecting it to the jsf/faces page.
For first request it works perfectly fine. But
The problem is when the page is reloaded using CTI the old url i.e. URL with servlet name gets called and
and again from the flow the servlet creates faces url and using sendRedirect() it calls .faces url.
And in debuging found that after the call sendRedirect() there is not call made to FACES servlet class.
First url which get hited first time
The URL get conveted by MyServletServlet class to
And when clicked on RELOAD then again the
used and the control come to service method of the MyServletServlet class but
after line response.sendRedirect(queryStr.toString()); the control get vanished.