• 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 ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

How to display result in the same jsp page after processing data in a servlet

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a jsp search page. When user clicks on the submit button, the search text would go to a servlet, get processed and the results should be displayed back in the same jsp page.

Could anyone please give me a hint as to how to proceed. I have tried request.forward, but somehow cannot get the control back to the jsp page to display the result, after processing.

Thanks for yoiur help in advance.

Regards,
Sumita
 
Ranch Hand
Posts: 300
Eclipse IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try using request.include(request,response) which includes the generated response into the target resource.
 
Marshal
Posts: 67451
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

sumita mukherjee wrote:I have tried request.forward, but somehow cannot get the control back to the jsp page to display the result, after processing.


Without an explanation of what the problem is, no help can be forthcoming. Please read this for more information.
 
Bear Bibeault
Marshal
Posts: 67451
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

ruquia tabassum wrote:try using request.include(request,response) which includes the generated response into the target resource.


And how will that help?
 
This tiny ad will self destruct in five seconds.
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic