Can we define a class in a JSP Page?

Report
Question
10 views

Please explain why do you think this question should be reported?

Report Cancel

To use a Java class method in jsp first we need to import a package inside which there is java class. The code of the program is given below:
<%
public class Person {
private int id;
private int age;
private String name;
/*
... ctor and getters and setters
*/
}
%
>

Please follow and like us:

About the Author