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?

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to