How to get request parameter of SlingServlet in OSGi Service ? | Community
Skip to main content
Suraj_Kamdi
New Participant
Oct 30, 2018 9:21 AM UTC

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
Oct 30, 2018 10:28 AM UTC

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
New Participant
Oct 30, 2018 10:33 AM UTC

@chandu t Do you any examples on that ?

Translate