The best way would be to do this in the same way as a text tag (implementation check), or the rest of the tags: by searching on the stack.
In addition, you probably do not want to explicitly point to ActionSupport , you will most likely want to check if it is valid for TextProvider , which really interests you.
I'm not sure your problem with the iterator is how it should be done, since your goal is to go through the stack and try with the highest TextProvider . You may not want to stop at the very top, depending on your needs / goals.
source share