dev2r-geek

Wednesday, November 30, 2005

A function inside a JSP

This is something that I recently found out the hard way. In JSP, never, ever use global variables using a <%! ... >. When the servlet is generated, the global variables are placed outside the service() method.

Why did I do this in spite of dire warnings? I needed to call a function inside a JSP. The simple solution: Don't. Put the method inside a bean and call it there. MVC, remember!?

0 Comments:

Post a Comment

<< Home


 

View My Stats