Monday, 21st June 2010
The new frontier for learning Java

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


Title (required):

Website:

Comment: