Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

372
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!