You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Chin, Ed" <ed...@lmco.com> on 2003/04/30 17:10:51 UTC
passing a vector of strings to jsp
I'm having trouble passing a vector of strings to a jsp page. The framework
seems to make conversions from "<" to "<".
Does anyone know how to fix this or get around it? Below is a quick example.
In my action class, I'm storing a vector of strings in the session like
this:
Vector test = new Vector();
test.add(new String("<td>1</td<td>2</td><td>3</td>"));
session.setAttribute("test", test);
In my jsp page I'm accessing the vector like this:
<logic:present name="test">
<logic:iterate id="row" name="test">
<tr>
<bean:write name="row" />
</tr>
</logic:iterate>
</logic:present>
But in my html output, I get this garbage:
<tr>
<td>1</td<td>2</td><td>3</td>
</tr>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: passing a vector of strings to jsp
Posted by Robert Taylor <rt...@mulework.com>.
Try,
<bean:write name="row" filter="false"/>
robert
> -----Original Message-----
> From: Chin, Ed [mailto:ed.chin@lmco.com]
> Sent: Wednesday, April 30, 2003 11:11 AM
> To: Struts Users Mailing List (E-mail)
> Subject: passing a vector of strings to jsp
>
>
> I'm having trouble passing a vector of strings to a jsp page. The
> framework
> seems to make conversions from "<" to "<".
> Does anyone know how to fix this or get around it? Below is a
> quick example.
>
> In my action class, I'm storing a vector of strings in the session like
> this:
>
> Vector test = new Vector();
> test.add(new String("<td>1</td<td>2</td><td>3</td>"));
> session.setAttribute("test", test);
>
>
> In my jsp page I'm accessing the vector like this:
>
> <logic:present name="test">
> <logic:iterate id="row" name="test">
> <tr>
> <bean:write name="row" />
> </tr>
> </logic:iterate>
> </logic:present>
>
>
> But in my html output, I get this garbage:
> <tr>
> <td>1</td<td>2</td><td>3</td>
> </tr>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org