On Sun, 2 Feb 2003, Anthony Kay wrote:
> Date: Sun, 2 Feb 2003 12:50:53 -0800 (PST) > From: Anthony Kay <[EMAIL PROTECTED]> > Reply-To: Struts Developers List <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: The RequestUtils interface > > > I have recently started working with the velocity tools for struts > in order to add struts 1.1 support. I've noticed that almost all of > the code that does real work is simply a re-write of what is in > the existing struts RequestUtils class. > > The problem is that the methods of RequestUtils were written to take > a PageContext in order to get the request, session, and applet context > objects, which is fine for JSP custom tag support, but display tools > for non-JSP systems do not have a PageContext. > > My suggestion (and I am willing to contribute the code) is to add > methods to the interface of RequestUtils that accept the request, > servlet context, etc. as parameters. The work code would migrate to > these, and the existing methods would extract the pieces from the > PageContext and delegate. > > For example: > > ModuleConfig getModuleConfig(PageContext pageContext) > { > return getModuleConfig(pageContext.getRequest(), > pageContext.getServletContext()); > } > > ModuleConfig getModuleConfig(HttpServletRequest request, > ServletContext application) > { > // existing code in RequestUtils, using new parameter names > } > > Comments? > I think this would make an excellent improvement for Struts 1.2, but would be a little disruptive at this stage of the game for 1.1. The best way to ensure that your work gets captured would be to submit an enhancement request in the bug tracking system: http://nagoya.apache.org/bugzilla/ and start attaching your proposed patches to it. Craig --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]