Re: WebApplicationContextProvider

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Aug 24 2004 - 15:09:39 EDT

  • Next message: Andrus Adamchik: "Re: Localizing Attributes?"

    On Aug 2, 2004, at 1:13 AM, Gary Jarrel wrote:

    > Hi All!
    >
    > Been reading the API, and it seems that the
    > WebApplicationContextProvider
    > only works for servlet spec 2.4. Is there a way to achieve the same
    > with
    > servlet spec 2.3 without having to change the rest of the application
    > that
    > current uses the BasicServletConfiguration to retrieve session bound
    > DataContexts.

    Hi Gary,

    Yes, WebApplicationContextProvider relies on Servlet 2.4 spec. If you
    need a thread-bound DataContext in a 2.3 container, you can implement
    similar logic (binding session DataContext to the request thread for
    the request duration) using another servlet specification hook - a
    custom Filter
    (http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/
    Filter.html). Read J2EE docs on how to set up a filter in web.xml. Note
    that I haven't tried this myself, but I can't see why it wouldn't work.

    Andrus



    This archive was generated by hypermail 2.0.0 : Tue Aug 24 2004 - 15:09:44 EDT