khoa235
asked on
How load data into <hml:img>?
I have a Class with Search feature.
---- User user=new User()
user.setHinhAnh(rs.getHinh Anh("image "));
BillAction Class
Tour td=new Tour();
billForm.setHinhAnh(td.get HinhAnh()) ;
thanks.
---- User user=new User()
user.setHinhAnh(rs.getHinh
BillAction Class
Tour td=new Tour();
billForm.setHinhAnh(td.get
thanks.
ASKER
How to load data under image file (Database) on <html:img> or <html:image>?
I am testing but only display image file. I am using <bean:write name property> tag.
Everyone can help me to solve that propblem! Thanks.
I am testing but only display image file. I am using <bean:write name property> tag.
Everyone can help me to solve that propblem! Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I don't understand. Because I have a Class include search method. In this method() I set image field into tour object. When I submit, file imge would loaded on <html:img>.
You cannot "embed" images in this way. That's not how HTML (which is what you are generating) works
You will have to do it the way evnafets says. Basically, write an image tag that points to a servlet, JSP, or Action class
Then write this JSP, servlet or action class so it encodes the Image as a JPG or PNG in the OutputStream
eg: http://weblogs.java.net/blog/jfalkner/archive/2005/05/blarg_15_how_ca.html
Tim
You will have to do it the way evnafets says. Basically, write an image tag that points to a servlet, JSP, or Action class
Then write this JSP, servlet or action class so it encodes the Image as a JPG or PNG in the OutputStream
eg: http://weblogs.java.net/blog/jfalkner/archive/2005/05/blarg_15_how_ca.html
Tim
ASKER
image file into database. common JSP programming, I can do that but Struts very difficult. everyone have solution to do that ? Only load image file into <html:img>tag.
I don't understand your last comment :-(
________
radarsh