tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <bay...@generationjava.com>
Subject RE: String Taglib and NewlineToken
Date Thu, 07 Nov 2002 04:13:14 GMT

Hi Calvin,

Try doing:

<str:replace replace="NL" with="<br>" newlineToken="NL">
  <bean:write name="article" property="articleBody"/>
</str:replace>

Let me know if that works, if not then I'll get 4.1 installed and try it
out myself.

Also be suspicious of the <br> in case it needs to be &gt;br&lt; in the
new version. [Not that I'm saying it will be, just stating the obvious :)]

Hen

On Wed, 6 Nov 2002, Calvin Lau wrote:

> Can someone give me an example of how I would use
> string:replace to change all the newlines in a chunk of
> text to <br> tags?  I had been using the following:
>
> <str:replace replace="
> " with="<br>">
> <bean:write name="article" property="articleBody"/>
> </str:replace>
>
> However, after moving to a new server and upgrading to
> Tomcat4.1, and this is no longer working.  I wanted to give
> the newlineToken nightly build a try.
>
> Thanks,
>
> Calvin
>
>
> On Fri, 25 Oct 2002, Henri Yandell wrote:
> ===========================================
> So I've now implemented a new attribute named newlineToken
> which is a special token to replace the forced newline. So
> you can do:
>
> <str:replace replace="hNL" with="j:NL:y"
> newlineToken="NL">ih
> huw</str:replace>
>
> and will match the newline. Also note that the same
> newlineToken may be used in the with attribute.
>
>
> __________________________________________________
> Do you Yahoo!?
> U2 on LAUNCH - Exclusive greatest hits videos
> http://launch.yahoo.com/u2
>
> --
> To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>


Mime
View raw message