jstl + string
hello, has anyone used the jstl along with apache's string tag library. I can't seem to get them to work together. Independently they both work fine, but when I add the string tag library to my jsp application which is using jstl, and go to the page which utilizes the string tag library i get: org.apache.jasper.JasperException: org/apache/commons/lang/NumberUtils What am I doing wrong? Has anyone gotten these two to work together. Thanks
Re: jstl + string
Thanks henri that was exactly my problem. Henri Yandell [EMAIL PROTECTED] 01/28/2003 05:13 PM Please respond to Tag Libraries Users List To: Tag Libraries Users List [EMAIL PROTECTED] cc: Subject:Re: jstl + string From this error report I'd say that you don't have the Apache Jakarta Commons Lang jar downloaded, it's a dependency of the String Taglib from 1.0 onwards. Additionally, the current nightly build of the String Taglib ought to interact a lot better with JSTL in that it should understand ${foo} EL variables etc. The nightly build has an important bugfix to do with using string tags inside loops as well. Hen On Tue, 28 Jan 2003, Jeff Wilder wrote: hello, has anyone used the jstl along with apache's string tag library. I can't seem to get them to work together. Independently they both work fine, but when I add the string tag library to my jsp application which is using jstl, and go to the page which utilizes the string tag library i get: org.apache.jasper.JasperException: org/apache/commons/lang/NumberUtils What am I doing wrong? Has anyone gotten these two to work together. Thanks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
FW: String TagLib 1.0 wordWrap StringIndexArrayOutOfBoundsException (Bug#15321)
Has anyone addressed this bug yet? robert -Original Message- From: Robert Taylor [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 11:58 AM To: Tag Libraries Users List Subject: RE: String TagLib 1.0 wordWrap StringIndexArrayOutOfBoundsException Okay. I entered it as a bug. See bug #15321. robert -Original Message- From: Henri Yandell [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 11:24 AM To: Tag Libraries Users List Subject: Re: String TagLib 1.0 wordWrap StringIndexArrayOutOfBoundsException Hey Robert, This is my fault, I need to somehow document that the wordWrap method is a bit suss. Certain combinations of characters in different positions can make it blow up, while the rest of the time it sails on through. It's definitely nothing you are doing but just dodginess in the underlying word-wrapping code. If you could push this into bugzill as a bug, hopefully it'll help kick me into refactoring and unit-testing that method. Most of String-taglib is in Commons Lang now [the underlying code], so it's well unit-tested there, but wordWrap and a couple of other methods are not. [quoteRegularExpression, wordWrap and truncateNicely] [metaphone and soundex are in Commons Codec, but not released there yet] [xml functions are not in Commons Lang] Sorry for the bugs, coder's fault. Hen On Thu, 12 Dec 2002, Robert Taylor wrote: I just downloaded the String Tag Lib 1.0 binaries and started using the wordWrap functionality. It seems to be blowing up if the tag attempts to wrap a string that contains a newline character as the 81st character. It will not blow up if the 81st character is not a new line character. This is my usage: string:wordWrapbean:write name=form property=body ignore=true//string:wordWrap Partial stack trace: 2120: java.lang.StringIndexOutOfBoundsException: String index out of range: 80 2120: at java.lang.String.charAt(String.java:455) 2120: at org.apache.taglibs.string.util.StringW.wordWrap(StringW.java:181) 2120: at org.apache.taglibs.string.WordWrapTag.changeString(WordWrapTag.java:159) 2120: at org.apache.taglibs.string.StringTagSupport.doEndTag(StringTagSupport.java:13 5) Has anyone else had this problem. I search bugzilla and didn't find any bugs mentioned. robert -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: FW: String TagLib 1.0 wordWrap StringIndexArrayOutOfBoundsException (Bug#15321)
No worries. Thanks for a very useful tag library! robert -Original Message- From: Henri Yandell [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 5:41 PM To: Tag Libraries Users List Subject: Re: FW: String TagLib 1.0 wordWrap StringIndexArrayOutOfBoundsException (Bug#15321) Nope. I'll get on it now. Sorry about that. Hen On Tue, 28 Jan 2003, Robert Taylor wrote: Has anyone addressed this bug yet? robert -Original Message- From: Robert Taylor [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 11:58 AM To: Tag Libraries Users List Subject: RE: String TagLib 1.0 wordWrap StringIndexArrayOutOfBoundsException Okay. I entered it as a bug. See bug #15321. robert -Original Message- From: Henri Yandell [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 11:24 AM To: Tag Libraries Users List Subject: Re: String TagLib 1.0 wordWrap StringIndexArrayOutOfBoundsException Hey Robert, This is my fault, I need to somehow document that the wordWrap method is a bit suss. Certain combinations of characters in different positions can make it blow up, while the rest of the time it sails on through. It's definitely nothing you are doing but just dodginess in the underlying word-wrapping code. If you could push this into bugzill as a bug, hopefully it'll help kick me into refactoring and unit-testing that method. Most of String-taglib is in Commons Lang now [the underlying code], so it's well unit-tested there, but wordWrap and a couple of other methods are not. [quoteRegularExpression, wordWrap and truncateNicely] [metaphone and soundex are in Commons Codec, but not released there yet] [xml functions are not in Commons Lang] Sorry for the bugs, coder's fault. Hen On Thu, 12 Dec 2002, Robert Taylor wrote: I just downloaded the String Tag Lib 1.0 binaries and started using the wordWrap functionality. It seems to be blowing up if the tag attempts to wrap a string that contains a newline character as the 81st character. It will not blow up if the 81st character is not a new line character. This is my usage: string:wordWrapbean:write name=form property=body ignore=true//string:wordWrap Partial stack trace: 2120: java.lang.StringIndexOutOfBoundsException: String index out of range: 80 2120: at java.lang.String.charAt(String.java:455) 2120: at org.apache.taglibs.string.util.StringW.wordWrap(StringW.java:181) 2120: at org.apache.taglibs.string.WordWrapTag.changeString(WordWrapTag.java:159) 2120: at org.apache.taglibs.string.StringTagSupport.doEndTag(StringTagSupport.java:13 5) Has anyone else had this problem. I search bugzilla and didn't find any bugs mentioned. robert -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: FW: String TagLib 1.0 wordWrap StringIndexArrayOutOfBoundsException(Bug#15321)
Nope. I'll get on it now. Sorry about that. Hen On Tue, 28 Jan 2003, Robert Taylor wrote: Has anyone addressed this bug yet? robert -Original Message- From: Robert Taylor [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 11:58 AM To: Tag Libraries Users List Subject: RE: String TagLib 1.0 wordWrap StringIndexArrayOutOfBoundsException Okay. I entered it as a bug. See bug #15321. robert -Original Message- From: Henri Yandell [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 11:24 AM To: Tag Libraries Users List Subject: Re: String TagLib 1.0 wordWrap StringIndexArrayOutOfBoundsException Hey Robert, This is my fault, I need to somehow document that the wordWrap method is a bit suss. Certain combinations of characters in different positions can make it blow up, while the rest of the time it sails on through. It's definitely nothing you are doing but just dodginess in the underlying word-wrapping code. If you could push this into bugzill as a bug, hopefully it'll help kick me into refactoring and unit-testing that method. Most of String-taglib is in Commons Lang now [the underlying code], so it's well unit-tested there, but wordWrap and a couple of other methods are not. [quoteRegularExpression, wordWrap and truncateNicely] [metaphone and soundex are in Commons Codec, but not released there yet] [xml functions are not in Commons Lang] Sorry for the bugs, coder's fault. Hen On Thu, 12 Dec 2002, Robert Taylor wrote: I just downloaded the String Tag Lib 1.0 binaries and started using the wordWrap functionality. It seems to be blowing up if the tag attempts to wrap a string that contains a newline character as the 81st character. It will not blow up if the 81st character is not a new line character. This is my usage: string:wordWrapbean:write name=form property=body ignore=true//string:wordWrap Partial stack trace: 2120: java.lang.StringIndexOutOfBoundsException: String index out of range: 80 2120: at java.lang.String.charAt(String.java:455) 2120: at org.apache.taglibs.string.util.StringW.wordWrap(StringW.java:181) 2120: at org.apache.taglibs.string.WordWrapTag.changeString(WordWrapTag.java:159) 2120: at org.apache.taglibs.string.StringTagSupport.doEndTag(StringTagSupport.java:13 5) Has anyone else had this problem. I search bugzilla and didn't find any bugs mentioned. robert -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: FW: String TagLib 1.0 wordWrap StringIndexArrayOutOfBoundsException(Bug#15321)
Okay, was an odd bug :) It occured on the 80th, 155th, 259th, 497th, 591st... element. Which might just be dependent on the random string i was throwing into it. Anyways, I've protected against it, and after I commit it'll go into tonight's nightly build. I've only tested the underlying Java util class, but it's there where the real bug is. The taglib should reflect the fix fine. wordWrap is one of those methods I know I should have done with far more beauty, but it's managed to evolve to pretty much do what it's meant to. I overestimated the pain of this bug I think :) Let me know if this fixes things for you tomorrow, Hen On Tue, 28 Jan 2003, Robert Taylor wrote: No worries. Thanks for a very useful tag library! robert -Original Message- From: Henri Yandell [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 5:41 PM To: Tag Libraries Users List Subject: Re: FW: String TagLib 1.0 wordWrap StringIndexArrayOutOfBoundsException (Bug#15321) Nope. I'll get on it now. Sorry about that. Hen On Tue, 28 Jan 2003, Robert Taylor wrote: Has anyone addressed this bug yet? robert -Original Message- From: Robert Taylor [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 11:58 AM To: Tag Libraries Users List Subject: RE: String TagLib 1.0 wordWrap StringIndexArrayOutOfBoundsException Okay. I entered it as a bug. See bug #15321. robert -Original Message- From: Henri Yandell [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 11:24 AM To: Tag Libraries Users List Subject: Re: String TagLib 1.0 wordWrap StringIndexArrayOutOfBoundsException Hey Robert, This is my fault, I need to somehow document that the wordWrap method is a bit suss. Certain combinations of characters in different positions can make it blow up, while the rest of the time it sails on through. It's definitely nothing you are doing but just dodginess in the underlying word-wrapping code. If you could push this into bugzill as a bug, hopefully it'll help kick me into refactoring and unit-testing that method. Most of String-taglib is in Commons Lang now [the underlying code], so it's well unit-tested there, but wordWrap and a couple of other methods are not. [quoteRegularExpression, wordWrap and truncateNicely] [metaphone and soundex are in Commons Codec, but not released there yet] [xml functions are not in Commons Lang] Sorry for the bugs, coder's fault. Hen On Thu, 12 Dec 2002, Robert Taylor wrote: I just downloaded the String Tag Lib 1.0 binaries and started using the wordWrap functionality. It seems to be blowing up if the tag attempts to wrap a string that contains a newline character as the 81st character. It will not blow up if the 81st character is not a new line character. This is my usage: string:wordWrapbean:write name=form property=body ignore=true//string:wordWrap Partial stack trace: 2120: java.lang.StringIndexOutOfBoundsException: String index out of range: 80 2120: at java.lang.String.charAt(String.java:455) 2120: at org.apache.taglibs.string.util.StringW.wordWrap(StringW.java:181) 2120: at org.apache.taglibs.string.WordWrapTag.changeString(WordWrapTag.java:159) 2120: at org.apache.taglibs.string.StringTagSupport.doEndTag(StringTagSupport.java:13 5) Has anyone else had this problem. I search bugzilla and didn't find any bugs mentioned. robert -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
How do tag libraries handle final references to specific images used in custom tags?
I'm familiar with the HTML tags for specifying images, either as a static image or as a button. I'm also familiar with how tag libraries work. What are useful conventions for building custom tags in a tag library that come with canned images? For instance, if a tag library provides some sort of tags which allow the user to specify moving forward and backward in a list, and the tag library provides the default images to use for the arrows, what provisions are commonly made for referencing the images from the generated HTML (or any other references)? Is there any history of making the generated HTML reference a servlet (or Struts action) with an attribute specifying an image name, and having the servlet stream the image from the classpath? If this is a reasonable strategy, what are issues/tradeoffs with this approach? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]