This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP common code  RSS feed

 
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: 66143
141
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!