File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: html:img Taking Different Dynamic SRC Value
 
Similar Threads
Can the 'id' in jsp:useBean id="xxx". be set using a Constants file ?
html:img usage
EL [] operator question
Passing Var's using include param
Problem in using property of a bean in composing a html link