On Sun, 2 Feb 2003, David Graham wrote:
> Date: Sun, 02 Feb 2003 18:34:14 -0700
> From: David Graham <[EMAIL PROTECTED]>
> Reply-To: Struts Developers List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: The RequestUtils interface
>
> I've always been a little unclear about what RequestUtils' role should be.
A way to make existing RequestUtils functionality that takes a PageContext
parameter available to non-JSP view technologies is a reasonable
refactoring to look at in a Struts 1.2 time frame.
> Passing in the ServletContext is redundant because (at least in servlet 2.3)
> you can get the session from the request and the ServletContext from the
> session.
>
The "at least in servlet 2.3" is one very important issue -- we cannot
disenfranchise servlet 2.2 users quite yet.
And of course, if you're running without sessions, the existence of the
HttpSession.getServletContext() method does not really help you anyway.
> David
>
Craig
>
>
>
>
>
> >From: Anthony Kay <[EMAIL PROTECTED]>
> >Reply-To: "Struts Developers List" <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: The RequestUtils interface
> >Date: Sun, 2 Feb 2003 12:50:53 -0800 (PST)
> >
> >
> >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]
>
>
> _________________________________________________________________
> Add photos to your messages with MSN 8. Get 2 months FREE*.
> http://join.msn.com/?page=features/featuredemail
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]