Hey all, It seems I was able to fix it by using the sling request fro ProcessingContext that is available in the TransformerFactory init method :). But it would still be nice to know if it is possible to get the context path without a sling request!
Greets, Roy > On 9 Dec 2016, at 17:14, Roy Teeuwen <r...@teeuwen.be> wrote: > > Hey all, > > I am trying to get the context path of the sling application somewhere where > I don't have a HttpServletRequest at hand, so I cant call > request.getContextPath(). > > More specifically I have a bug in a TransformerFactory that transforms links > to versioned clientlibs (acs-aem-commons > VersionedClientlibsTransformerFactory), but my application has a context > path, so this doesn't work. > I want to try and see if I can fix it myself and create a PR instead > reporting a bug, but I'm a bit lost in how to get the context path. Anyone > can help? > > Greets, > Roy