• Post Reply Bookmark Topic Watch Topic
  • New Topic

Display servlet response on same jsp

 
sheetal kaman
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
I have a JSP file which has a form to be processed.
After taking the form input, the control is given to servlet to fetch database records based on value submitted in form.

Now, I have redirected to SAME JSP.
I am even able to retrieve servlet values in JSP.

The only thing is :

when the JSP first processes, the table layout is also printed and then the servlet response values in table format is displayed.

I want the form to ask only the name and print the table only on submit.

Here goes my code in JSP




Details is displayed along with the form.
I want is, it should display only on button click after recieving the servlet response.

Thank you.
 
Tapas Chand
Ranch Hand
Posts: 602
9
BSD Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can hide the table initially with if-condition.
The condition can be anything suitable as per your need.
 
Tapas Chand
Ranch Hand
Posts: 602
9
BSD Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you know how to use <c:if> in JSP?
 
sheetal kaman
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the response.
I got the solution for it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!