This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Struts and the fly likes html:img Taking Different Dynamic SRC Value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html:img Taking Different Dynamic SRC Value" Watch "html:img Taking Different Dynamic SRC Value" New topic
Author

html:img Taking Different Dynamic SRC Value

Alec Lee
Ranch Hand

Joined: Jan 28, 2004
Posts: 569
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

Joined: Feb 15, 2005
Posts: 4864
A Scroptlet will work also:

src='<%=mySource%>'


Merrill
Consultant, Sima Solutions
Alec Lee
Ranch Hand

Joined: Jan 28, 2004
Posts: 569
Yes, I am thinking too much about script-free page. Sometimes scriptlet can achieve simple things.
 
Don't get me started about those stupid light bulbs.
 
subject: html:img Taking Different Dynamic SRC Value