Hello friends, I am working on Servlet/JSP project. There are large no. of jsp pages. A common set of methods get repeated in all the jsp pages. Now my concen is to separate out the methods in a file and then use it in jsp page. I have taken out the methods and created a separate jsp page and have included it in all the required JSPs. The other approach which comes to my mind is to create a simple java class with the common utility and importing it in JSPs. Kindly suggest me the right path to follow, taking into consideration that we take up the optimized solution. Please reply ASAP since it is quite URGENT ! Thanks in advance. Regards.
Well, kindly comment on the performance on these approaches. 1. Using 'include jsp' 2. using 'taglib' 3. creating a seperate utility class with the required methods and 'import' it in the JSP pages. Thanks again!
Taglib and auxilliary class are functionally equivalent and should be faster than include due to include having to invoke another JSP. However I doubt your users could tell the difference, so you should go for a design that is easily maintained. Bill