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 issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html:img issue" Watch "html:img issue" New topic
Author

html:img issue

Simpson Kumar
Ranch Hand

Joined: Mar 19, 2008
Posts: 260
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?


Thanks,
Kumar
Simpson Kumar
Ranch Hand

Joined: Mar 19, 2008
Posts: 260
Even I tried like the following also.. but no use



could some one give me the suggestions on this
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29261
    
140

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Simpson Kumar
Ranch Hand

Joined: Mar 19, 2008
Posts: 260
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

Joined: Oct 17, 2008
Posts: 12
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] %>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: html:img issue
 
Similar Threads
Display Images using Struts
Image load on IE is getting problem
how to decide which button is submitted in an action class
Display image from blob field
Regarding "html: img " tag