Joined: Tue Mar 27, 2007 10:55 pm Posts: 2279 Location: Earth Has thanked: 39 time Have thanks: 61 time
Example show how to make initialization for function within jsp tags . Numbers double function is created . Note: That the "out" object is not allowed to be used within the <%! tags %>
Code:
<HTML> <HEAD> <TITLE>Creating a Method in jsp</TITLE> </HEAD>
<BODY> <H1>Creating a Method in jsp</H1> <%!
int Double(int number) { return 2*number; } %>
<% out.println("The Double of 3 is = " + Double(3)); %> </BODY> </HTML>
_________________ Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )