
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to call a Java function inside JavaScript Function?
JavaScript cannot call java method directly since it is on the server. You need a Java framework like JSP to call when a request is received from JavaScript. Let’s see how to use JSP to call a Java function inside JavaScript function.
Here’s the JavaScript code:
//javascript code function initiateFunc() { $.get('localhost/project/myexecution.jsp); } $( initiateFunc);
Here’s the JSP code for “myexecution.jsp”:
<%@ page import="deleteconfig"%> <% deleteconfig.initiate(); %>
- Related Questions & Answers
- How to call a virtual function inside constructors in C++?
- How to call jQuery function with JavaScript function?
- JavaScript Function Call
- How to call a function in JavaScript?
- How to call a function inside a jQuery plugin from outside?
- How to delay a JavaScript function call using JavaScript?
- How to call a JavaScript function from C++?
- How to call a JavaScript function on click?
- How to call a JavaScript function in HTML?
- How to call a JavaScript function on submit form?
- How to call a JavaScript Function from Chrome Console?
- How to turn a String into a JavaScript function call?
- How to call a JavaScript function on a click event?
- How to use setInterval function call in JavaScript?
- Call a function with onclick() – JavaScript?
Advertisements