[MAGNOLIA-1679] Expose ServletContext in WebContext Created: 13/Aug/07  Updated: 23/Jan/13  Resolved: 11/Oct/07

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 3.1 M3
Fix Version/s: 3.5 RC1

Type: Improvement Priority: Minor
Reporter: Fabrizio Giustina Assignee: Fabrizio Giustina
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 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);



 Comments   
Comment by Fabrizio Giustina [ 19/Aug/07 ]

added to trunk as described

Comment by Magnolia International [ 11/Oct/07 ]

(just changing fix version)

Generated at Mon Feb 12 03:29:15 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.