commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: [Chain] WebServletContext constructor is redundant
Date Sun, 28 Sep 2003 22:24:45 GMT
Sgarlata Matt wrote:

>I think the constructor for
>org.apache.commons.chain.web.servlet.ServletWebContext
>has a redundant parameter.  Here is the signature:
>
>public ServletWebContext(javax.servlet.ServletContext context,
>                         javax.servlet.http.HttpServletRequest request,
>                         javax.servlet.http.HttpServletResponse response)
>
>The ServletContext can be retrieved from the request, with
>request.getSession().getServletContext() right?
>
Only in a Servlet 2.4 or later environment.  It also requires the 
creation of a session if there wasn't one before, and that's not going 
to be desireable, so -1 on changing this.

>  Can I submit a patch to
>remove the ServletContext parameter?  Looking through the Chain code, it
>looks like the
>org.apache.commons.chain.web.servlet.ServletSetLocaleCommandTestCase will be
>broken by this change, so if I submit a patch I will patch this file as
>well, and possibly the MockServletRequest, etc. that this test case depends
>on.
>
>Matt
>  
>
I'm half way through implementing Context "as a" Map instead of "has a" 
Map.  After I get done with that, I'll look at ChainServlet and 
ChainAction (the latter should probably end up in the Struts 
contrib/struts-chain repository, right?).

Craig

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



Mime
View raw message