Dev - ServletContext not being used in event handlers

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Dev - ServletContext not being used in event handlers

byersa
I was wondering if there was any reason why the ServletContext object is
not set in the event handler (specifically, the  JavaEventHandler) and
set as an attribute in the request object? I could use it in the CMS
routines for getting content. Sometimes they need to know the webSiteId,
rootDir and https. It was okay when everything was done in the
viewhandler, but I see a need for this when you have events creating the
response.

-Al
 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Dev - ServletContext not being used in event handlers

David E. Jones

I think we had code in the ControlServlet to put the ServletContext  
in a request attribute at one time, but now you can get this through  
the session or request (via the session) objects using the  
HttpSession.getServletContext() method, so we just leave it to that.

-David


On Feb 21, 2006, at 11:28 PM, Al Byers wrote:

> I was wondering if there was any reason why the ServletContext  
> object is
> not set in the event handler (specifically, the  JavaEventHandler) and
> set as an attribute in the request object? I could use it in the CMS
> routines for getting content. Sometimes they need to know the  
> webSiteId,
> rootDir and https. It was okay when everything was done in the
> viewhandler, but I see a need for this when you have events  
> creating the
> response.
>
> -Al
>
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev

smime.p7s (3K) Download Attachment