I have like 5 .JSP scripts. I have declared a method in one of these 5 scripts, but I need to be able to call this method from all 5 .jsp scripts??? How can i do that.
1) Write an include file with the *global* function in it, and include it in your JSP like :
Code:
<%@ include file="functions.inc" %>
Personally, I think this would be not a very nice way do it, and I would much prefer :
2) Create a util or helper class that performs generic functions relative to your site. This obviously means you need to compile the class, know about packages, import statements and the like to implement this more neat method.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.