Define a method in a JSP page

From CodeCodex

Implementations[edit]

Java[edit]

<%!
public String sayHello(){
    return "Hello";
}
%>


<%= sayHello() %>