Groupdocs-annotation java problems

Operating environment: Jdk1.7+tomcat7+groupdocs-annotation-2.0.0

Note: examples are groupdocs-annotation java-2.0.0 version encountered the following two questions, please help to solve it

  1. When Upload the Chinese name of the file ,displayed Garbled

attachment(1)

// UploadFileServlet.java
String uploadFileName;
uploadFileName = request.getParameter("fileName");
File tempFile = File.createTempFile("annotation-upload", "_" + uploadFileName);
FileOutputStream outputStream = null;
InputStream uploadInputStream = null;
try {
    outputStream = new FileOutputStream(tempFile);
    uploadInputStream = new FileInputStream(tempFile);
    IOUtils.copy(request.getInputStream(), outputStream);
    writeOutput(MediaType.APPLICATION_JSON, response,
        annotationHandler.uploadFileHandler(uploadFileName, uploadInputStream));
} catch (AnnotationException e) {
    Logger.getLogger(this.getClass().getName())
          .log(Level.SEVERE, MESSAGE_HANDLER_THROWS, e.getMessage());
    writeOutput(MediaType.APPLICATION_JSON, response,
        toJson(new StatusResult(false, e.getMessage())));
}
  1. IE10 compatibility view and IE7, IE8 initialization page display error

attachment(2)

critical code

// IndexServlet.java
request.setAttribute("annotation_scripts",
    annotationHandler.getAnnotationScript(initialPath, userName, userGuid));
RequestDispatcher requestDispatcher = request.getRequestDispatcher("annotation/index.jsp");
requestDispatcher.forward(request, response);

Hello,

Thank you for your request.

Seems that your first issue can depend from browser encoding, so please try to change it. Unfortunately , we don’t support legacy version of our GroupDocs.Annotation anymore, so we recommend you to migrate to the new version of the library. You can download it from here.

If you will have any questions for new version , then please create new thread with your questions and we will be glad to help you.

Sorry for the inconvenience.


Best regards,
Evgen Efimov

Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+