Personally, I would suggest that the existing org.apache.velocity.tools.struts.StrutsUtils package be extended to incorporate module support, the ActionMessage queue, or whatever other Struts 1.1 feature you're after. (I'm using the current version with B3 now, and it works like a charm.)

The RequestUtils package is really the "JspRequestUtils" package, and probably should stay that way. The much better route, IMHO, is for other presentation devices to do their own, optimized versions of RequestUtils.

I do have a few tweaks of my own for the Velocity Tools package. Should I send you the patches to review, Anthony?

-Ted.

Anthony Kay wrote:
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]



--
Ted Husted,
Struts in Action <http://husted.com/struts/book.html>


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

Reply via email to