Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Creating a reusable html table  RSS feed

 
Jim Petersson
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a html table that is used on multiple jsp-pages. As it is now, every jsp-page has a copy of that table (code is copied over several jsp-pages).
What I would like to do is refactor the code, so that the same table is used on every page.

I tried to put the table in a separate jsp-page, and then do a <jsp:include ...> on it wherever I need it.
This works, but is there a better way to do it? What if I for instance would like to somehow pass in a parameter determining the size of the table? How would that be accomplished?

Thanks
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then use jsp:param to pass the parameters
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A custom tag implemented via a tag file would be my first choice.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!