aspose file tools
The moose likes JSP and the fly likes Code re-use - what's the best practice Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Code re-use - what Watch "Code re-use - what New topic

Code re-use - what's the best practice

Reggie McDougal
Ranch Hand

Joined: Sep 27, 2004
Posts: 69
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.

You can never drink too much
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 62317

Perfect opportunity for a custom tag.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
It is sorta covered in the JavaRanch Style Guide.
subject: Code re-use - what's the best practice