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

Using custom tag to display different image  RSS feed

 
John King
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to display a differnt image file in my header
according to differnet requesting URL. How could I do
it with custom tag?

I want to do it in my JSP something like:

<myapp:header company="abc" />

A different header will show up depending on the company attribute.

Any suggestion? Thanks.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66182
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seems pretty straight-fowrward: based upon the value of the attribute the <img> tag spit out by the custom tag as part of the header references the URL of the appropriate image.

What part has you stumped?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!