Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

373
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda