Free Support Forum - groupdocs.com

Document could not be loaded


#1
The error is:
ViewDocumentHandlerServlet Servlet.service() for servlet ViewDocumentHandlerServlet threw exception java.lang.ArrayIndexOutOfBoundsException: 38

The path is:
http://localhost:8080/portal/docviewer/?file=C:\pdf\a.pdf

My properties are:
groupdocs.viewer.filePath=C:/pdf/
groupdocs.viewer.applicationPath=http://localhost:8080/portal/docviewer/
groupdocs.viewer.uploadPath=C:/pdf/

My servlets application are configured to reply to http://localhost:8080/portal/docviewer/ path.

1) Why this error?

2) Why upload servlet use the servlet 3.0? How can I modify the example to use servlet 2.5?

#2
Hello ,

Thank you for your inquiry.


Basically this parameter file="path to local path" can work only if it was configured filePath property in the application.properties file. And then you should use only the file name , like this http://localhost:8080/portal/docviewer/?file=a.pdf .

About Servlet 2.5 api - basically you should not change this code , just try to change servlet-api.jar file from lib folder on 2.5 version servlet api, and then rebuild .war file. The sample should works well for servlet 2.5 api.

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

--------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+