The "delims" attribute of <c:forTokens> works just like the "delim" argument to a StringTokenizer constructor. For example, if you do:
StringTokenizer st = new StringTokenizer("line1<br>line2", "<br>", true); Then st.countTokens() will return 6, not 3. In other words, the "delims" attribute should be thought of as a set of delimiter characters, not as a single delimiter string. Quoting Mark Lowe <[EMAIL PROTECTED]>: > So you want to replace <br> for \n or similar. > > <c:set var="str" value="${myForm.myProperty}" /> > <c:forTokens var="tok" items="${str}" delims="<br>"> > <c:out value="${tok}\n" /> > ... > > This might work. > > > On 14 Jan 2004, at 14:30, Otto, Frank wrote: > > > Hello, > > > > I want to write a string like "line1<br>line2". > > > > If I use <bean:write name="myForm" property="myProperty"/>, I will get > > line1<br>line2. > > If I use <bean:write name="myForm" property="myProperty" > > filter="false"/>, I will get line1<br>line2. > > > > But I want to write: > > > > line1 > > line2 > > > > How can I do this with struts? > > > > > > Regards, > > > > Frank -- Kris Schneider <mailto:[EMAIL PROTECTED]> D.O.Tech <http://www.dotech.com/> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]