Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Code re-use - what's the best practice

 
Reggie McDougal
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a reusable piece of code I use for navigation that will be the
same thoughout the application, for navigation in all my jsp's.

next, last, previous etc...

Now my question is what is the best practice in storing this code, I need to used the request object as you can see below.

1. Should I use an include.jsp
2. A bean??

If some one could give an idea of what the best appraoch is would be great.


 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64683
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perfect opportunity for a custom tag.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic