Free Support Forum -

Getting error while calling viewDocumentHandler method: Java


I am using GroupDocs 2.14.0 for Java.

I tried to integrate it to my application, however while calling viewDocumentHandler(HttpServletRequest request, HttpServletResponse response), I am getting following error in Google Chrome console.

Please refer to the attached screenshot. I need to give a demo of this integration to the leadership in order to get the approval for buying a license of Group Docs.
Can you please help me out ASAP ? Thanks!

Milan Pandey



I was able to resolve this error, by deploying my application as ROOT. I am not sure why it it was not working when context root was my application name.
Probably, while calling viewDocumentHandler method, it was absolute path rather than relative.

Can you please verify and fix it.


Hello Milan ,

Thank you for your inquiry.

If you need to use your application name as root for the GroupDocs.Viewer for Java library , then you should configure applicationPath property in the file . For example your application name is "document-viewer" then you should configure it as shown on a screenshot and then you can run your document-viewer.war file of the application on the web server . It should be available by this url http://localhost:8080/document-viewer/

If you will have more questions please feel free to contact us.


Best regards,
Evgen Efimov
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+