I know Subject looks similar to ones you can find on forum, but I did try and unfortunatelly couldn't solve my problem. Have JSP index.jsp file with Button which invokes to Class GetDetails and inner method, let say "test" method. Button works fine if i.e js function is called, but doesn't for other Class Method. pls take a look and point me my errors.:)
index.jsp
....
<html>
<head>
<meta charset="UTF-8">
<title>Invoke method - test</title>
</head>
<body>
<button onclick="f_show()">show</button>
<div id="div1"></div>
<div id="div1"></div>
</body>
<script>
function f_show(){
var sText="testtesttest"
document.getElementById("div1").innerHTML=sText;
<%
GetDetails test=new GetDetails();
test.testMethod2();
%>
document.getElementById("div2").innerHTML = test;
}
</script>
GetDetails.java
import try.invokeMe;
public class GetDetails {
static public String testMethod2(){
System.out.println("testetstest");
return "testetsttest";
}
}