Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to declare on a function at JSP page?

Status
Not open for further replies.

thelordoftherings

Programmer
May 16, 2004
616
IL
Hello,

I have very long code on a JSP page but whenever I try to devide it into functions I receive an error.
Can someoneshow me please a simple example of a JSP function use?

 
To create "global" variables for use inside of functions, declare them up top inside of <%! ... %> tags.

I suppose the functions could be anywhere, but I put them at the bottom, also inside <%! ... %> tags. The functions are written as usual in Java (public String myFunc(int first, float second, String etc).

'hope that helps.

--Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top