I have a component that is also a service. It initialize the variables inside the activate function and return them with another function.
Inside the jsp i have MyService pageService = sling.MyService(MyService.class) that launch the activate method. This part of code work fine
Now inside the java code if i create an object of MyServiceImplementation and i try to retrieve the variables, they are all empty because the activate function isn't launched.
Can i force the launch pageService.activate(ctx)? What can i put as ctx?
Another way is to use the service directly inside the java but i don't have the sling variable and i don't know how to retrieve that