•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 426,134 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,755 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 1193 | Replies: 2
![]() |
•
•
Join Date: Apr 2007
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
<div id="sidebar">
<logic:present name="userVO">
<logic:iterate id="element" name="userVO" property="features" indexId="i">
<a href="<bean:write name="userVO" property='<%= "featuresLinks["+ i +"]" %>' />" class="sidebar"> <html:image src="<bean:write name="userVO" property='<%= "imagePaths["+ i +"]" %>' />"/> </a>
</logic:iterate>
</logic:present>
<version data="11.01.04svp1"><sysinfo data=""></sysinfo></version>
</div>
I am trying to place a link with an image. However, I am getting run-time exception that says "equal symbol expected" in the expression.. It points to 'O' in userVO in the image:src
I am totally lost on why I am getting this error.. and any help/pointers in this regard will be much appreciated.
Thanks
<logic:present name="userVO">
<logic:iterate id="element" name="userVO" property="features" indexId="i">
<a href="<bean:write name="userVO" property='<%= "featuresLinks["+ i +"]" %>' />" class="sidebar"> <html:image src="<bean:write name="userVO" property='<%= "imagePaths["+ i +"]" %>' />"/> </a>
</logic:iterate>
</logic:present>
<version data="11.01.04svp1"><sysinfo data=""></sysinfo></version>
</div>
I am trying to place a link with an image. However, I am getting run-time exception that says "equal symbol expected" in the expression.. It points to 'O' in userVO in the image:src
I am totally lost on why I am getting this error.. and any help/pointers in this regard will be much appreciated.
Thanks
•
•
Join Date: May 2005
Location: Wellington, New Zealand
Posts: 182
Reputation:
Rep Power: 4
Solved Threads: 3
I'm not too familiar with JSP at the moment. But you are confusing your HTML code with your interpreted code... I presume that JSP is parsed once. So you shouldn't include JSP tags inside other JSP tags.
I think the error it is reporting is that it thinks that "<bean:write name=" is the value of the src attribute. I think this isn't a problem in the a tag, because that tag is an html tag and not a JSP rendered tag.
instead of <html:image> use <img>.
actually I think this will work, but its not really knowledge, google should explain it better. which is probably a good idea ;-)
I think the error it is reporting is that it thinks that "<bean:write name=" is the value of the src attribute. I think this isn't a problem in the a tag, because that tag is an html tag and not a JSP rendered tag.
instead of <html:image> use <img>.
actually I think this will work, but its not really knowledge, google should explain it better. which is probably a good idea ;-)
•
•
Join Date: Nov 2004
Location: Netherlands
Posts: 5,752
Reputation:
Rep Power: 18
Solved Threads: 199
<html:image> can in fact be correct, depending on the tag libraries in use.
It will likely generate an <img> tag based on its parameters.
But yes, the nesting of tags CAN be problematical. Especially when you're nesting custom tags with JSP taglets and scriptlets you're asking for trouble (nesting tags within a single tag library is usually fine).
It will likely generate an <img> tag based on its parameters.
But yes, the nesting of tags CAN be problematical. Especially when you're nesting custom tags with JSP taglets and scriptlets you're asking for trouble (nesting tags within a single tag library is usually fine).
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
![]() |
•
•
•
•
•
•
•
•
DaniWeb JSP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Please help(Problem in insertion data to database) (JSP)
- Truth Table (Computer Science and Software Design)
- Jsp doesnt return parameter value (JSP)
- Can't run JSP in Browser (JSP)
- Complex Numbers (C)
- Can't run JSP in Browser (Web Browsers)
Other Threads in the JSP Forum
- Previous Thread: Calling JSP function from Button??
- Next Thread: jsp,eclipse and weblogic server



Linear Mode