Bug 35569

Summary: wordWrap does not insert the split string
Product: Taglibs Reporter: tung.nguyen
Component: String TaglibAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: P2    
Version: 1.1.0   
Target Milestone: ---   
Hardware: All   
OS: other   

Description tung.nguyen 2005-07-01 01:32:21 UTC
I have the following in my JSP:
<string:wordWrap width="10" delimiter="<br>" 
    delimiterInside="false" split="-">1234567890123456</string:wordWrap>
I expect to get 
123456789-
0123456
but got 
1234567890
123456
Comment 1 Rahul 2005-07-01 04:00:36 UTC
Indeed, I see no snippet that will insert splits (other than in comments). The 
padding with spaces also caught me slightly off-guard with regards to splits. 
In my opinion, we will need a patch (or the split attribute needs to be 
removed from the tag).

While glancing at the code, I also noticed:
1) Delimiter longer than width will cause an exception
Failing test case:
o.a.t.s.u.StringW#wordWrap("abcd", 2, "myDelim", "-", true)

2) Code assumes delim length will be 1
Failing test case:
o.a.t.s.u.StringW#wordWrap("a_ _bc defghijkl", 10, "_ _", "-", true)

String Taglib committers - 

I intend to pursue patch(es) in my spare time. Would you like me to open 
separate bugzilla tickets for the above two issues?

-Rahul
Comment 2 Henri Yandell 2009-08-20 00:57:16 UTC
Closing as WONTFIX.

String Taglib is being deprecated and I don't expect the wordWrap tag to make it into the Extended Taglib which will house some of its functionality.