You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by sr...@chennai.tcs.co.in on 2003/10/01 13:10:37 UTC

html:link and JspWriter

Please have a look at the piece of code below
--------------------------------------------------------------------
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>

<%!
void showMenu(JspWriter out)
{
      for(int i=1; i<10; i++)
      {
            out.print("<html:link action=" + i + ">" + i + "</html:link>");
      }
}
%>

<% showMenu(out); %>
--------------------------------------------------------------------

The above code generates a HTML that looks like below and thus I don't get
the hyperlinks as the custom tags are not parsed

<html:link action=1>1</html:link>
<html:link action=2>2</html:link>
...
...
<html:link action=8>8</html:link>
<html:link action=9>9</html:link>

How do I make it generate the below way instead.

<a href=1>1</a>
<a href=2>2</a>
...
...
<a href=3>3</a>
<a href=4>4</a>


Regards
Sreekant G