Hi there I’ve successfully setup a function in JSP can calling it from the same file.
I want to separate my logic from presentation, how would I go about throwing this function <%! somewhere else in a class and then accessing it from my .jsp front-end file>?
Hi there I’ve successfully setup a function in JSP can calling it from the
Share
Yes, you must have to avoid Java code in JSP files. Take a look at – How to avoid Java Code in JSP-Files? You need to place (create and compile) a public class definition under the
WEB-INF/classes. For instance,