Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
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(); %>
Advertisements
