struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Graham <grahamdavid1...@yahoo.com>
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.

David

--- Andrew Hill <andrew.david.hill@gridnode.com> 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:
> http://issues.apache.org/bugzilla/
> 
> -----Original Message-----
> From: george.baxter@convergys.com [mailto:george.baxter@convergys.com]
> Sent: Monday, 7 July 2003 17:25
> To: struts-user@jakarta.apache.org
> 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 George.Baxter@convergys.com
> www.convergys.com
> 
> --
> "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: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Mime
View raw message