Link to home
Start Free TrialLog in
Avatar of KirtipurItagol
KirtipurItagol

asked on

Struts Image tag!

Hi experts, how to change this html image tag:

<td background="images/Line_Vertical_dotted.gif" width="1"></td>

into a struts image tag??

Thanks..
Avatar of Manikandan Thiagarajan
Manikandan Thiagarajan
Flag of India image

Avatar of KirtipurItagol
KirtipurItagol

ASKER

very good article but doesn't solve my question though...
i've an html image tag like this :

<IMG height=4 src="image/spacer">
I can use a struts tag and change the above into:
<html:img height=4 srcKey="image.spacer"/>

There's no problem with that.
But here's another scenario:
here's my html image tag-----><td  background="images/Line_Vertical_dotted.gif" width="1"></td>
I want to change that into <html:img ...................../>
Any clue?

Avatar of CEHJ
>>
I want to change that into <html:img ...................../>
Any clue?
>>

Do you mean you no longer want the td background to be the image?
I want the functionality to be unchanged ....thanks
You can use a style tag and css, which you should anyway in fact, as presentation should not be conflated with html tags
May be I'm too confusing here.....So, there's no substitution for background attribute using struts tag?? forexample, i can use srcKey for src....
The html:img tag always renders an HTML <img> tag. The tag that you'd be using would have to be html:td which does not exist. You will just have to put the absolute or relative path to the image in the <td> tag or, as was already suggested, use a style sheet. I'd go with the style.
Or else I can just leave it like that, correct??
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

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
basically the html guy screw the whole html page....and now he doesn't exist in the company...and I dont' have much skill on CSS....I want to replace all the html tags into struts tags...CEHJ can you tell me the right way to initiate??
thanks..