I'm developing a good hybrid5 HTML5 mobile app and my backend will be done with Java and MySQL.
I am using PhoneGap and the same one to generate the APP needs that my files are of extension .html
.css
.js
, to generate the installation file, so my business rules are in the backend on .jsp
pages that connect to the database. The question is how to make the result obtained on a page in the backend ex: resultado.jsp
appear on a page with HTML extension EX: mostra-resultado.html
.
I know I could do something with Ajax but I still can not see the build of it, can someone give me a light or an example.
More or less the idea, this is just to give the light a concept, no commitment to the truth.
<!--Exemplo da página html-->
<html>
<button>Chama a lista 1</button>
<button>Chama a lista 2</button>
<div>
<!--Resultado da lista que foi verificada na página.jsp-->
</div>
</html>
<!--Exemplo da página .jsp-->
<jsp>
if(lista1){
<!--Mostra o resultado da lista 1 -->
}else if(lista2){
<!--Mostra o resultado da lista 1 -->
}
</jsp>