• Post Reply Bookmark Topic Watch Topic
  • New Topic

class/function inside JSP

 
Kedar Dravid
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it legal to have a Java class/ function inside a JSP?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you would put the declarations inside the declaration delimiters <%! %>.

Now, as to whether it's a good idea or not is another story. I'd advise against it. The general consensus is that the less Java on a JSP, the better; none being ideal.
[ December 02, 2004: Message edited by: Bear Bibeault ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!