• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP common code

 
Andy Hahn
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have a question about JSPs in one of my projects. If I have a method that I want to be executed each time any of my JSPs are called, where would I place it? I do not want to use a scriptlet in all of my JSPs (the easy answer). I would like to somehow fit it into one place - possibly using inheritance? For example, to the servlet the JSPs extend?
Thanks.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Avoid doing anything in the JSPs at all. Look into using a filter.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!