Sunday, 16th October 2011
Follow WikiJava on twitter now. @Wikijava

Define a method in a JSP page

From WikiJava

Jump to: navigation, search


This example shows how to create a function inside a JSP file

Contents

the article

It's really straightforward, the example shows how to define the method and how to call it.

the JSP

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

See Also

Real's Java How To

Comments from the users

To be notified via mail on the updates of this discussion you can login and click on watch at the top of the page


Comments on wikijava are disabled now, cause excessive spam.