Viewer of Java Library shows only plain text

I downloaded and testing GroupDocs Viewer for Java library example project from: http://groupdocs.com/Community/files/9/java-libraries/groupdocs_viewer_for_java/entry750.aspx.


I successfully started the spring webapp on Tomcat.

If I upload any files(pdf, doc), the webapp shows thumbnail of the documents on the left side (of browser) well.
However in the main view, it showes only plain text. without any css style or images.

(I also inspected the rendered html, then the a style block above the content contained only ‘null’.)

Screen capture here:
Dropbox - Error - Simplify your life

Do you have any clue to investigate?

Thank you.

p.s.
I can’t attach this file due to error : ‘You do not have permission to upload or link to files’.

Hello, Lee. We can’t confirm this error with our testing files. Can you upload your files to dropbox (as you did with the screenshot)?

OK, Actually my files are same as the example projects in your site. (/samples/spring)
You can check my files here: https://www.dropbox.com/s/wpdxd66r6fxtewc/spring.zip

Add to this, I didn't exactly follow your guide.

If I execute 'mvn clean install tomcat7:run' the error says:

[ERROR] Failed to execute goal on project viewer-tomcat: Could not resolve dependencies for project com.groupdocs:viewer-tomcat:war:2.0.0: Could not find artifact com.groupdocs:viewer:jar:2.0.0 in central (http://repo.maven.apache.org/maven2) -> [Help 1]

Version 2.0.0 does not exist in maven repository I think.

Because of this error, I downloaded the version 2.0.0 jar file directly, and added it to my Java build path.

(2.0.0 jar file here: http://groupdocs.com/Community/files/9/java-libraries/groupdocs_viewer_for_java/default.aspx)

I am running tomcat with intelliJ IDEA.


Thank you your help.


You can install the library into your local maven repository. Don’t know if IntelliJ IDEA has this ability on the UI, but I think that does, because NetBeans provides it.


Looked into spring.zip you provided, but had not found sample files there.

Can you provide those files which you are trying to view. Files which by your words are rendered without CSS in the GroupDocs.Viewer.


UPDATE:
Asked our Java developer who uses IntelliJ IDEA how to install library locally. You can just add the configuration as on the sample here: http://screencast.com/t/BMLg9deZ and then run maven build.

I didn’t know that I could install the library into my local maven repository. I have no error with maven now, thanks for telling me.

The file I converted here: Dropbox - Error - Simplify your life

I tested with several files and all I tested were not able to be viewed with css styles.

Also I found your sample project has a little bug.
If I select a file from input file tag and upload it, it redirects without context path.
Your pom.xml file setting’s context path is ‘document-viewer’ /document-viewer I had to replace it to /.
or I could add the context path to url in browser and reloaded.
ex:
http://localhost:8080/view?tokenId=xxx
==> should be : http://localhost:8080/document-viewer/view?tokenId=xxx

Last, I changed a application.properties:

groupdocs.viewer.useCache=true
==> ‘false’ was default value

Hello, Lee.
Glad to see it was useful for you. In pom file we use context path 'document-viewer' since earlier version of Viewer could work only from this path. Now this issue is fixed and Viewer works from any path, from root and from context. So this is not a bug,

As for style issue – this is a known bug and we work on it, in next release it will be fixed.
Please stay tuned and check new release for this fix.
Also If you have any additional questions please feel free to get back in touch.