Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

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

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.


Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic