Free Support Forum -

fieldIncludeText.setSourceFullName with authentication

I am trying to include a file in other file using FieldIncludeText. Both the files are in jackrabbit content repository with authentication protection. Without authentication token we can not read or write the data from repository.

When i try to replace the file using
fieldIncludeText.setSourceFullName(“http://localhost:8080/jackrabbit-webapp-2.16.2/repository/default/SampleDoc.docx”); its not working as it requires some authentication token but we can not pass the authentication header here.

Do we have any other solution to include a file.


Thanks for your inquiry. The FieldIncludeText.SourceFullName property gets or sets the location of the document using an IRI.

It seems that you want to insert the DOCX file at the place of field. If this is the case, we suggest you please get the stream of SampleDoc.docx, import it into Document, and insert it at the place of field using DocumentBuilder.InsertDocument. This method inserts content of the document into the current position of DocumentBuilder’s cursor.