Link to home
Start Free TrialLog in
Avatar of khoa235
khoa235

asked on

How load data into <hml:img>?

I have a Class with Search feature.
---- User user=new User()
user.setHinhAnh(rs.getHinhAnh("image"));
BillAction Class
Tour td=new Tour();
billForm.setHinhAnh(td.getHinhAnh());
thanks.
Avatar of radarsh
radarsh

Guess the question is grossly incomplete.

________
radarsh
Avatar of khoa235

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.
ASKER CERTIFIED SOLUTION
Avatar of evnafets
evnafets

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of khoa235

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>.
Avatar of TimYates
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
Avatar of khoa235

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 :-(