> -----Original Message-----
> From: Erik Beeson [mailto:[EMAIL PROTECTED] 
> 
> It seems there is currently no way of getting at the 
> ServletContext, only the 
> HttpServletRequest/HttpServletResponse (from anywhere, an 
> Action, an Interceptor, a Component, etc) unless I'm missing 
> something. If there is a way, I'd love to hear it.
> 
> To fix this, I've added ServletConfig to the ActionContext, 
> since it exposes everything else one might want.

Not sure what you mean here. You didn't add it to the ActionContext
class? No, wait... Looks like you added it to the extra context that is
passed in to create the ActionContext by the ServletDispatcher. Ok.

> 
> Also, there is currently no ServletActionContext, so getting 
> the request object looks like: HttpServletRequest request = 
> (HttpServletRequest)ActionContext.get(WebWorkStatics.HTTP_REQUEST);
> 
> Since this is more than a little ugly, I've added 
> com.os.ww.ServletActionContext with 
> getRequest/getResponse/getServletConfig/getServletContext/getP
> arameters.

How about making ServletActionContext extend ActionContext, only have a
private constructor? That way, you can still get at all of the old stuff
from ActionContext plus the new stuff by just using ServletActionContext
and you don't have to use ActionContext from Webwork. I've made this
change on mine.... Of course, I can't see if it still passes your unit
tests because there aren't any... :-)

> The last two aren't as important as the first three as
> SAC.getServletContext() just does 
> getServletConfig().getServletContext()
> and SAContext.getParameters() just does 
> ActionContext.getParameters(), but I added it to be orthogonal.
> 
> Also, I'd like to suggest renaming WebWorkStatics to 
> WebWorkConstants as I think it's more clear.

+1

> 
> Thoughts on all this? All but the WebWorkStatics rename is in 
> sandbox/webwork now.
> 
> --Erik
> 

Jason


-------------------------------------------------------
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to