Another option is to get inject a Container component:

@Inject Container container; 

then container.getRequest() 

and if you need to access HTTP parameters: ((ServletRequest) 
container.getRequest).getHttpServletRequest()

Thanks
-Vincent

On 8 Apr 2015 at 17:38:23, Marius Dumitru Florea 
([email protected](mailto:[email protected])) wrote:

> One option is to use a RequestInitializer as in
> https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-sheet/xwiki-platform-sheet-api/src/main/java/org/xwiki/sheet/internal/SheetRequestInitializer.java
> .
> 
> Hope this helps,
> Marius
> 
> On Wed, Apr 8, 2015 at 6:20 PM, Nicolas Delsaux wrote:
> > Hi,
> > for one of our projects, we're creating a XWiki component, based upon this
> > documentation
> > (http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents).
> > In documentation, it is said we can access the XWikiContext, which is also
> > said to be deprecated.
> >
> > Considering that, and the fact we're running in XWiki 7.0, what is the best
> > way to get incoming request parameter ?
> >
> > Thanks
> > _______________________________________________
> > users mailing list
> > [email protected]
> > http://lists.xwiki.org/mailman/listinfo/users
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to