Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

374
Visualizações
calling java method from javascript in jsp class for Logging

I have a jsp file which has a submit button. On clicking this the call goes out to a different angular app. I want to log which user is clicking the button. For this I am thinking of calling a javascript function. Inside the javascript function callJSFunction() I want to pass the username of the user and call a java function. Inside the java function I need to store the user details in th db. My question is how can I call a java method (for logging) from the javascript. I am sure this a common use case for logging information in jsp. I am not sure how to achieve this? Any help is greatly appreciated.

<A class="gridlink1" id="portal"
    title="Go to portal for <%= StringEscapeUtils.escapeHtml(resultBn.getName()) %>"
HREF="<%= resultBn.getLink() %>" onclick = "callJSFunction()"> <%=resultBn.getID()%>
</A>

function callJSFunction(){
    alert("hello"); //palceholder
}
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda