In the HTML spec, there are many tags which don't require an ending tag.
The <input> tag is one such element.  The XML-like self-closing tag is not
part of the HTML spec.  I've seen a lot of this with struts and other tools
which use XML.  Another example is the <br> tag which is often improperly
specified as <br/>. Since it doesn't have an associated end tag, page
authors often mistakingly specify this tag as <br/>.  There are many more
examples. 

So, the way Struts does this via <html:image/> is correct.  

-Tom
Tom Maccariella
Sengen


-----Original Message-----
From: Denis Hanson [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 26, 2001 11:27 AM
To: Struts-User
Subject: Beta 1 image tag bug



I just converted my project to the Beta 1 version of struts and encountered
a problem with the <html:image/> tag.  The image tag appears to be eating
the closing quote on the property (name) attribute.  The <html:image/> code
worked fine with struts.jar from 2/21.


Here's some test jsp code:

<td colspan=4 align=center>
   <html:image property="Logon" src='<%=ip+"images/btnLogon.gif"%>'/>
   <input type="image" name="Logon" src='<%=ip+"images/btnLogon.gif"%>'
border="0">
</td>

And here's the output html:

<td colspan=4 align=center>
  <input type="image" name="Logon src="en/images/btnLogon.gif">  <--- no
closing quote
  <input type="image" name="Logon" src='en/images/btnLogon.gif' border="0">
</td>

Thanks,

Denis Hanson

Reply via email to