• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

html:img issue

 
Simpson Kumar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can we set parameters to the image action? if you see the following code you can understand my question..



I want to pass the imageId as the parameter and the value from the expression.

If I pass the direct value (/ImageAction.do?imageId=9), I can see the image on screen,

How can I pass the parameter?
 
Simpson Kumar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Even I tried like the following also.. but no use



could some one give me the suggestions on this
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
378
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sumant,
If you look at the HTML code generated by your JSP, what does it output for that line? Please post that here as it will be a big clue as to why you aren't getting the expected output.
 
Simpson Kumar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Jeanne ,

Thanks for your reply, I see the HTML code from JSP and I see the image path like the following

JSP CODE

HTML CODE


I don't know why still that parameter is going directly instead value.
 
asdf lkjh
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the question is still relevent
<code>
<html:img action="/ImageAction.do?imageId='<%=imageIds[0] %>'" height="100" width="100"/> </code>

Remove '' that surrounds <%=imageIds[0] %>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic