Skip to main content
Suraj_Kamdi
New Participant
October 30, 2018

How to get request parameter of SlingServlet in OSGi Service ?

  • October 30, 2018
  • 14 replies
  • 12079 views

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
New Participant
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.

Suraj_Kamdi
New Participant
October 30, 2018

@chandu t Do you any examples on that ?