1

I am working on a dynamic webpage where I need to display the response from the Servlet response in the bottom same jsp page.

Below is the sample screenshot the index.jsp where the user needs to provide the inputs and click the Submit button. The results needs to be displayed below input values.

enter image description here

index.jsp:

<div id = "Order">
<table align="center" id="table">
<form name="orderform" action=OrderController method="POST">         
<td class="label">Dispatch Site<select type="text" style="width:172px" name="branch">                               
<option selected value="0">All Branches</option></select></td>
<td class="label">Service<select class="SelectionBoxes" style="width:172px" id="Serviceselect" name="Serviceselect"</td>
<td class="label" >Order<select class="SelectionBoxes" style="width:172px" id="Orderstatus" name="Orderstatus"></td>                                
<td class="label">Start Date<input type="text" style="width:168px"  name="startdate" id="StartDate" >
<td class="label">End Date<input type="text"  style="width:168px" name="enddate" id ="EndDate">
<button class="submit" name="submit" value="submit">Submit</button></td>
</tbody>
</table>
</div>
<div id ="OrderResult" style="display: none;">
<table align="center" border=1>
<thead><tr>
<th>Order Number</th><th>Service Type</th><th>Customer Number</th></tr>
</thead><tbody>
<c:forEach items="${orders}" var="order">
<tr><td><c:out value="${order.branch}" /></td><td><c:out 
value="${order.service}" /></td><td><c:out value="${order.customernumber}" 
/>
</td></tr>
</c:forEach>
</tbody></table></body></html>

Previously i had a response.jsp which displays the results now i want to show the results in the same page. Can anyone explain me how to get the results in same page ?

Ravi
  • 30,829
  • 42
  • 119
  • 173
chimbu
  • 33
  • 1
  • 10

0 Answers0