Simply.. you can't.
Or to be more precise: you can't using that standard servlet-based method 
(MgnlContext is not, as you said, a WebContext instance).
This is a common issue, that happens in scheduled jobs too.

Workaround: have a look at the property "magnolia.webapp" (alternatively, 
"magnolia.app.rootdir").
That would be in 99% of cases your context name.

Matteo

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=451c7a23-c1c1-4108-a04e-152c245d6400


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to