File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 63858

Perfect opportunity for a custom tag.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Code re-use - what's the best practice
It's not a secret anymore!