permaculture playing cards*
The moose likes JSP and the fly likes How to display result in the same jsp page after processing data in a servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "How to display result in the same jsp page after processing data in a servlet" Watch "How to display result in the same jsp page after processing data in a servlet" New topic
Author

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

sumita mukherjee
Greenhorn

Joined: Aug 27, 2007
Posts: 22
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
carina caoor
Ranch Hand

Joined: Jun 23, 2007
Posts: 300

try using request.include(request,response) which includes the generated response into the target resource.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

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

And how will that help?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to display result in the same jsp page after processing data in a servlet