File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

missing end tags on html:text

 
Ben Hagadorn
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my JSP page I have the following code:

<html:form action="/eelsLogin">
<table align="center" width="85%">
<tr>
<td class="8PtBlueBold" width="30%">User ID :</td>
<td><html:text property="userName" size="15"/></td>
</tr>
<tr>
<td class="8PtBlueBold">Password :</td>
<td><html assword property="password" size="16"/></td>
</tr>

<tr><td colspan="2" align="center" valign="bottom" height="30"><html:submit styleClass="button_77px" value="Login" /></td></tr>
</table>
</html:form>


Notice that the html:text and html assword tags both have and ending "/". when my page generates this is the HTML I get:

<form name="eelsLoginForm" method="post" action="/EELS/eelsLogin.do">
<table align="center" width="85%">
<tr>
<td class="8PtBlueBold" width="30%">User ID :</td>
<td><input type="text" name="userName" size="15" value=""></td>
</tr>
<tr>
<td class="8PtBlueBold">Password :</td>
<td><input type="password" name="password" size="16" value=""></td>
</tr>

<tr><td colspan="2" align="center" valign="bottom" height="30"><input type="submit" value="Login" class="button_77px"></td></tr>
</table>
</form>

Notice that now the ending "/" is missing from the tags. I've also tried explicitly ending them (</html:text> and that does not help at all. This pages is for a customer who requires that the page validates through the W3C markup validator and this is causing it to fail. Any ideas?
 
Ben Hagadorn
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never mind - I got it.

I needed to change my <html> tags at the top to:

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<html:xhtml/>
 
Brent Sterling
Ranch Hand
Posts: 948
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have used this tag to turn on xhtml generation:

<html:xhtml />

- Brent
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic