Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

html:img Taking Different Dynamic SRC Value

 
Alec Lee
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to use <html:img> to display different pictures depending on the value of some other beans without using EL syntax? The 'src' seems accept a runtime expression but if i dont want to use EL (e.g. with JSP 1.2 container) what else can i use as the runtime expression?

Or would there be a better strategy other than using runtime expression?
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A Scroptlet will work also:

src='<%=mySource%>'
 
Alec Lee
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I am thinking too much about script-free page. Sometimes scriptlet can achieve simple things.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic