Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HttpServletResponse#sendRedirect() doesnot work from servlet when the URL is rehitted/refreshed

prash patil
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

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.

queryStr = pages/ps_corr_history.faces?PsAction=360&payhisttms_CF=&CaseId=&UserId=AGENTSP&MsgId=752009.123.123.12.

Thanks in advance.


  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic