• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

TLD custom tag reference problem

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've been using TLDs and custom tags for a while now with a lot of success. However, i seem to have come across something I'm not sure how to deal with.

I have a class with a static method:



I have a TLD which references this static method:



And finally I have the JSP which calls the TLD:




Here's the problem - if I make Dog a subclass and move the getPaper() static method to the superclass, the JSP will no longer recognize getPaper() as an available method. I can easily get around this by making a getPaper() method for every subclass instead, but that's not very OO. Am I violating some core Java principle here? Why doesn't this work?

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic