Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-1679

Expose ServletContext in WebContext

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • 3.5 RC1
    • 3.1 M3
    • core
    • None

    Description

      We currently have request and response available in WebContext but there is no easy way for users to get a reference to a ServletContext without creating a session (request.getSession().getServletContext()).

      Since WebContext is initialized in a filter, we have a servletContext at hand and we could make it available to users by setting it in WebContext.

      I propose to add it as a third parameter in the WebContext init method:

      MgnlContext.initAsWebContext(request, response, servletContext);

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              fgiust Fabrizio Giustina
              fgiust Fabrizio Giustina
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Task DoD