Hi i am trying to call regular java class in jsp page and want to print some on jsp page when i am trying to do i am not getting any output
Here is my code
MyClass.java
package Demo;
public class MyClass {
public void testMethod(){
System.out.println("Hello");
}
}
test.jsp
<%@ page import="Demo.MyClass"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<jsp:useBean id="test" class="Demo.MyClass" />
<%
MyClass tc = new MyClass();
tc.testMethod();
%>
</body>
</html>
How can I get my desired output?