Free Support Forum - groupdocs.com

Group Doc Viewer for Struts2 Framework


#1

Hi Experts,

Please help me , to setup the GroupDoc viewer over Struts2 Framework, I have converted all the Servlet in to Struts2 Action, given in Sample Application.
Still I am unable to load resource and files over viewer.
Thanks.

#2

Hi Prashant,


Thanks for showing you interest in GroupDocs.Viewer for Java and letting us know about your preferred framework.
Our current showcase project is developed in Spring framework, but we have added your preferred framework in our support development plan.
As we get any update on it, we will inform you.

Best Regards

#3

Hi Atir,


Thanks for the consideration !
But we are in urgency in this subject, I am planning to buy some licenses for the Group Doc viewer, But I was not sure that it will work in out current framework setup.

I have tried converting the servlets of JAVA sample application, but I am facing lots of errors in that.

We are using Struts2 Framework along with Hibernate to load file stream.

Its my humble request, if you guys can provide us guidance to set it up so that I can showcase the same to management.

#4

Hi Parshant,


Thanks for explaining your concerns.

As you told:
I have tried converting the servlets of JAVA sample application, but I am facing lots of errors in that.
Can you explain that what kind of error you have found?

We are using Struts2 Framework along with Hibernate to load file stream.

Please let us know that did you try simple file loading in your application (Just like as done in our sample application)?

We’ll try our best to help you to resolve your issues.

Have a nice day!

#5

Hi,


Yes, I when I am running the sample application for Java Servlet as it is, It is working fine.

But When I am converting the same servlets to Struts2 Action Classes, I am getting 404 error for loaded resources (CSS,JS,Images) and for all the Handler Servlets.

#6

Hi Experts,


I have got a Sample Application for Spring, Can you guys help us to give me sequence of these methods mentioned in controller class as attached in file.

Thanks
Prashant

#7

Hi Prashant,


The documentation is still in progress. Therefore, I am copying your required information here to save your time. Please see below table which will hopefully be helpful for you:

<span style=“font-family:“Verdana”,“sans-serif”;mso-fareast-font-family:
“Times New Roman””>Actions/Methods Invocation<o:p></o:p>

Following table explains when actions and methods are triggered:

Action/Method

Trigger

public ModelAndView redirectToViewer

Triggers at page load, http://localhost:8080/action

public ViewDocumentResponse viewDoc

Triggers at document load

private String GetFileUrl

Triggers from ViewDoc

public FileBrowserTreeDataResponse loadFileBrowserTreeData

Triggers at document load

public GetImageUrlsResponse GetImageUrls

Triggers at document load

public String removeExtention

Triggers form GetPdfWithPrintDialog

public ResponseEntity GetResourceForHtml

Triggers at document load time on HTML Based Rendering

public ResponseEntity GetPdfWithPrintDialog

Triggers at getting print dialog

private void GetFile

Triggers at document download time

public final Map GetDocumentPageHtml

Triggers on loading document next page in HTML Based Rendering

private List GetHtmlPages

Triggers from ViewDoc and GetDocumentPageHtml

public String GetPdfDownloadUrl

Triggers from ViewDoc

public final ResponseEntity GetDocumentPageImage

Triggers at load time in Image Based Rendering

private MediaType GetContentType

Triggers from GetDocumentPageImage

public final String GetFileUrl

Triggers from GetPdfDownloadUrl, GetPdfPrintUrl, ViewDoc, GetFileUrl

private String GetPdfPrintUrl

Triggers from ViewDoc


#8

Hi Prashant,


Thanks for giving a try to our Spring showcase example.

The concerned team is creating the documentation for the controller class you asked for. Once they complete it, they will update you in this thread soon.

Please stay tuned.

Regards

#9

Hi,


Thanks for thr prompt support, I am trying at my level to convert it to Struts2, hope my team could able to do the same.

Still I am looking forward to get a sample application for Struts2 framework from Group Doc Team.

Thanks.
Prashant

#10

Hi Prashant,


Thanks for your feedback.

It is good to know that you are trying to implement at your end by learning from Spring showcase. At our side, we have added Struts2 showcase in our future plans. However, based on the pending tasks we have on our side, we may not be able to start working over it during the next few weeks. Once we make any progress over Struts2 showcase, we’ll let you know. In the meantime, if you come across any issues while implementing at your side, please do let us know. We’ll try to help you out as best as we can.

Best Regards

#11

Hi Thanks !


can you please confirm my understanding for the document viewer controller methods calling flow ?


#12

Hi Prashant,


Yes, I think you are correct. For a detailed review of the diagram you created, I have asked the concerned technical team member to look at the flow for verification.

In the meanwhile, we have also released first version of the documentation of Spring MVC Front End which will give you more insight. Please feel free to have a look at:

http://www.groupdocs.com/docs/display/viewerjava/GroupDocs.Viewer+for+Java±+Spring+MVC+Front+End

Especially the below two articles sound useful:

http://www.groupdocs.com/docs/display/viewerjava/Technical+Overview
http://www.groupdocs.com/docs/display/viewerjava/GroupDocs.Viewer+for+Java+Front+End+JavaScript+API+Parameters

Hope it helps.

Best Regards

#13

Hi !,

I am getting following error during document load. Please help !

<u style=“box-sizing: border-box; border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; font-family: “PT Sans”, Helvetica, Arial, sans-serif; line-height: 18px; text-align: -webkit-center; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;”>Request processing failed; nested exception is class com.groupdocs.viewer.internal.c.a.pd.c.c: CreationDate value is empty.
<u style=“box-sizing: border-box; border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; font-family: “PT Sans”, Helvetica, Arial, sans-serif; line-height: 18px; text-align: -webkit-center; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;”>
<span style=“box-sizing: border-box; border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; font-family: “PT Sans”, Helvetica, Arial, sans-serif; line-height: 18px; text-align: -webkit-center; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;”>Please find the stack trace for the same -
<u style=“box-sizing: border-box; border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; font-family: “PT Sans”, Helvetica, Arial, sans-serif; line-height: 18px; text-align: -webkit-center; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;”>
<u style=“box-sizing: border-box; border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; font-family: “PT Sans”, Helvetica, Arial, sans-serif; line-height: 18px; text-align: -webkit-center; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;”><pre style=“box-sizing: border-box; border: 1px solid rgb(232, 232, 232); outline: 0px; vertical-align: baseline; margin-top: 0px; margin-bottom: 20px; padding: 15px; line-height: 1.5; font-stretch: normal; font-family: Monaco, Courier, “Courier New”, monospace; white-space: pre-line; overflow: auto; word-break: break-all; word-wrap: break-word; clear: both; background: rgb(239, 242, 243);”>org.springframework.web.util.NestedServletException: Request processing failed; nested exception is class com.groupdocs.viewer.internal.c.a.pd.c.c: CreationDate value is empty com.groupdocs.viewer.internal.c.a.pd.e.hC.d.cYV(Unknown Source) com.groupdocs.viewer.internal.c.a.pd.Q.bHS(Unknown Source) com.groupdocs.viewer.internal.c.a.pd.Q.getCreationDate(Unknown Source) com.groupdocs.viewer.converter.a.h.aW(Unknown Source) com.groupdocs.viewer.helper.b.c(Unknown Source) com.groupdocs.viewer.helper.b.b(Unknown Source) com.groupdocs.viewer.handler.ViewerHandler.a(Unknown Source) com.groupdocs.viewer.handler.ViewerHandler.getDocumentInfo(Unknown Source)

#14

Hi Prashant,


Thank you for coming back.

Apparently, the error stack indicates that the issue is with some particular document. I am attaching a couple of sample docs with this post and you can test them with the GroupDocs.Viewer. In case you are able to view these documents seamlessly, please share the particular document with which you are getting the said exception. In case the same error occurs with the attached sample docs, please do let us know.

Regards

#15

Hi Sabir,

First of all Eid Mubarak to you.

As you have shared the methods called on different controllers, same way can you share the Request and Response Parameters for all the methods ?

Thanks
Prashant

#16
Hi Prashant,

Thanks for the Eid Mubarak :)

Prashant.Sharma:
As you have shared the methods called on different controllers, same way can you share the Request and Response Parameters for all the methods ?

Sure - we 'll arrange to provide the requested details.

Best Regards

#17

Hi Prashant,


We are pleased to inform you, we have added request and response parameters for all the methods in our documentation.
Please visit Technical Overview article for further details.

Hope it will help you.
Many Thanks

#18

Hi Prashant,


We are glad to inform you that GroupDocs.Viewer for Java Struts 2 Front End project has been developed by the concerned team and it’s available for download. You can download and explore the Front End.

You may find following resources helpful:
Struts 2 Front End Project - Download Project
Struts 2 Front End Documentation - Project Documentation

Have a nice weekend ahead.
Best Wishes