Sure, You would be able to achieve it by AEM Forms. Please refer to following links, for any reference.
i need to store all the data in sql,can i be able to retrieve it using java and display it?
or is there any possiblity to use JCR for storing
Yes, both are possible.
You can write your data dumping / retrieval logic in java or if you wish you can store in JCR as well.
the search component's result should be already stored in database. how to store all the data in JCR in AEM? it is not submit form where we can get the data form form and store it in db. the result data should be stored predefined so using search we can just retrieve the data and display it.
Those links were for reference. You can always write a click expression on your button, hit your servlet and fetch results. If your search web service have swagger / wsdl configured, you can directly map your fields to its input and output using rule editor.  
If your result is in form of array/list, you will find it useful to use repeatable panels  or repeatable row in table .