Call servlet dopost programmatically
Hi,
I am trying to play around with acs common feature Querypackager .
Querypackager servlet is registered with resourcetype and have selector and extension.
I would like to programmatically call this servlet from my workflow.
I am getting 500 response. I am having following queries :
- I am getting an exception in error log ,
illegalargumentexception: cannot create a node on synthetic resource and ModifiableNode exception.
I have googled and ended up finding none to resolve the issue.
- I have referred the following link calling a servlet.
I have followed the same ay for calling he doos bt ith resorcetye.
My resource type is resolving in resource resolver and i am calling with _jcr_content.package.json
i didnt find any other way how to implement.
Is there any other way to implement the servlets registered with resourcetype.
- The page where the servlet is triggered is located in /etc/acs-commons.
I have the user with admin permissions, do i need to pass the csrf token programmatically set in the headers of the http post method?
- What are all the headers and parms need to set to call a post servlet
Please provide any references and solutions to above.