Please try to set the "applicationPath" parameter as "/" for the application.properties file, then the upload should work well. Also you can configure the "uploadPath" parameter and then you will upload your files to this local url "C:/Projects/GroupDocs/Apps/xFiles/uploadPath".
If you will have more questions please feel free to contact us.
We are sorry that you have such issue. We have reproduced it and this issue will be resolved in our next release of the GroupDocs.Viewer for Java , that should be tomorrow or after tomorrow.
But could you please let me know other alternatives i can work around to make sure groupdocs viewer is showing the file in the index page for the file i have uploaded.
We have attached to this thread our Spring sample with our test file . Could you please check it , also please check our video how it works for us here .
If you still get the issue with your file please share it for us.
But in my environment still the same issue, even i have used the sample spring demo application you have shared with me.
Still i am facing the same issue i.e. i am able to upload the document but unable to view the document though token id is passing to the view mapping.
After uploading this is what the screen I am getting,
whereas file is uploaded actually.
But view is working not showing anything. This is what the
issue I am facing.
View URL is below like this: with uploaded token id but
still nothing is showing in the page.
Could you please specify, why in your URL you use "groupdocs-viewer-spring" name, do you made any changes in the pom file in our samples or in the code? If yes, then please share with us this changes, because our sample should be stored on this URL "http://localhost:8080/view?tokenId=v9/pDoBRCD7oqodejrbYClj9L9Qq5EgeOltg/7wRZ8vmFU4OFY/HPzBPqC9seXAweQ/YQk3VI/7UkakktHVAiETCx8c3LzMDQ6wmjYf5nBI=".
Please share with us your environment (Java and TomKat version) and how do you tried to run our sample. Also will be useful if you share with us a screenshot of logs from browser console. You can share this screenshot via Google Drive, DropBox or some other cloud service.
Come back to us with these details and we will be glad to help you.
I am using Eclipse for this, Below are the steps did for the same.
1) Imported the provided sample spring demo application as Exsiting maven project into eclipse
2) configured apache tomcat 7 in eclipse
3) did mvn clean install for the spring demo and added the project to tomcat7
4) ran tomcat 7 and the application is up
5) able to do the upload of the file in the location provided in application.properties.
6) But not getting succesful in viewing the uploaded file in groupdocs viewer.
Below are the few points i would like to know regarding the ViewerHandler and EncodedPath Classes in the process of viewing the file in groupdocsviewer.
1) Since EncodedPath(filepath, serviceconfiguration) expects the filepath parameter, how do i know the filepath of the already uploaded file.
Do we have any class which gives the file path by providing the fileName?
Is it fine if i use CustomInputHandler to upload the file and get the filePath while viewing.
2) in case of ViewerHandler class’s getViewerScript(viewerId, initialFilepath, locale), what need to be passed for viewerId.
can we pass any if not how do we set this viewerId before we pass to this method.
The viewerId parameter is a simple id for DIV tag where the Viewer will be put. Please check index.jsp file and you will find there this <a rel="nofollow" href="http://prntscr.com/7tdc1i">code</a>.
We think that you have this issue because you have misconfigured project deployment. If we understand you correct, you got the document-viewer.war after command "mvn clean instal", then you tried to run it on TomCat7 and you hasn't changed the pom.xml file. But our sample is configured to deploy with this context "/" and you should rename your .war file to ROOT.war and then run it on TomCat.
Or you can change the configuration of the sample deploying in the pom.xml file for example:
org.apache.tomcat.maven
tomcat7-maven-plugin
2.0
document-viewer/
and then change applicationPath parameter in the application.properties file :