@sarojni, Hello.
I notice that the script below has if-tests for the name of the launching button-click. You have one for "insert", which happens to be the value for two different submit buttons. One of those is the "add new item" button.
and this is from the
JSP form:
Now, do you understand? Also, I do not know what you are going for here, but if I had been writing this, I would want the "Add new Item" button to land just where it is landing. Then, after completing the addition of the item, I might want it to land back on the display page.
Anyway, I hope this helps.