struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Graham <>
Subject RE: Request/Response Utils future request
Date Mon, 07 Jul 2003 13:42:43 GMT
This is one reason why static methods are evil.  RequestUtils will be
decomposed into smaller, more focused utility classes (like one for JSP
tags).  That will be a good time to make the change to a Singleton
pattern.  This has already happened with the new TokenProcessor class by
the way.


--- Andrew Hill <> wrote:
> +1 (& crossposting to struts-dev to try and spark some discussion on
> implementation)
> Couldn't agree more George.
> I too have come across *numerous* situations where I wanted to override
> and
> do things a little bit differently for certain cases. And not just with
> Request & Response Utils but also with a lot of the commons stuff like
> BeanUtils, PropertyUtils etc....
> This is a good example of why its best to use singletons for utility
> classes - even if all the methods can be static - as other folk may want
> to
> override...
> If you want them to look at it you will need to add it as an enhancement
> request in bugzilla:
> -----Original Message-----
> From: []
> Sent: Monday, 7 July 2003 17:25
> To:
> Subject: Request/Response Utils future request
> For a future version of Struts, I'd like to request that the Request and
> Response Utils be an instantiated object that we can subclass.
> One reason is that I'd like to override the 'filter' method of
> RequestUtils.  It currently iterates through every character in the
> string.
> I have another 'filter' that I use for i18n purposes (LTR and RTL
> displays)
> that does the same thing, and I don't want to have to iterate through a
> string twice!
> In addition, the filter seems to be missing a few, such as the british
> pound symbol.
> Since I currently cannot override this method, I have to choose between
> doing the iteration twice or not use the struts jsp tags... ugly choice,
> no?
> Thanks!
> -gjb
> e-mail
> --
> "NOTICE:  The information contained in this electronic mail transmission
> is
> intended by Convergys Corporation for the use of the named individual or
> entity to which it is directed and may contain information that is
> privileged or otherwise confidential.  If you have received this
> electronic
> mail transmission in error, please delete it from your system without
> copying or forwarding it, and notify the sender of the error by reply
> email
> or by telephone (collect), so that the sender's address records can be
> corrected."
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message