How to add/ modify/ delete/ read contents to a Plone portal from java application

I want to add contents like adding new page, new folder etc. to Plone portal from java application. Let me know if there is any API meant for java that can integrate with Plone.


AFAIK, there's no such this as a Java client for Plone.
Since Plone is a webapp, you could write an HTTP client to do whatever you need it to do.

Please let us know if you have any specific Plone questions.


1 Like

Thanks for your suggestion. I think HTTP client is not possible because when we use POST method URL contains a session Id attached to it. And lot of hidden variables also. So, if I want to post any content to Plone websites via java is not possible.

Just GET the forms from the server and fill in the details, like a normal browser would :wink:

We also support webdav, so maybe that could work?


What about Plone JSON API?

1 Like

I'm using

while post ie

I'm getting 302 status code and location something like this

I think above link is related to cookie
Can anyone please send me snippet code to set cookie(Same as plone) while sending request to POST url using

Or any working java code related to plone to post file .

thanks in advance

Log in to Plone using a browser, and observe the communication using e.g. Firebug or Chrome developer tools.
You'll see that Plone sets a __ac cookie when authentication succeeds.
So in your Java code, you'll need to send the username/password in the same manner that the browser sends them. And you'll need to capture the __ac cookie and resubmit it in subsequent requests. See HttpClient cookie documentation.

"Plone JSON API" sounds good, I would try that first. Otherwise Zope/Plone also supports XML-RPC: .

There is also an add-on which extends the list of methods available through XML-RPC, see for more info.