Skip to main content
Suraj_Kamdi
Community Advisor
Community Advisor
October 30, 2018

How to get request parameter of SlingServlet in OSGi Service ?

I want to fetch the properties in OSgi Service like userName , which is set in request parameter in a my custom SlingServlet ? Anyone has an idea about how to achieve this task ?

I have one RegisterUserSlingServlet class and CustomMailService as OSGi service. I want get some request parameters properties inside my CustomMailService.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

14 replies

chandu_t
Level 3
October 30, 2018

Assuming you call CustomMailService in RegisterUserSlingServlet. You get request parameters in servlet by request.getParameter("key"). You can pass this parameters to the service, while invoking service method.

Translate
Suraj_Kamdi
Community Advisor
Community Advisor
October 30, 2018

@chandu t Do you any examples on that ?

Translate
Suraj Kamdi