SmartGWT/GWT: Show a PDF on client side

╄→尐↘猪︶ㄣ 提交于 2019-12-12 01:33:08

问题


I have an already generated PDF on my server-side,I would like some help on showing the pdf when clicking a button on the client side.

How should I create the conextion with the server and client using the shared?

Thank you for your help.


回答1:


Create a servlet and call it from client side on clicking a button.

String servletName = GWT.getModuleBaseURL().replace("/" + GWT.getModuleName(), "")
                     + "pdf_download_servlet";
Window.open(servletName, "", "");

For a servlet code please have a look at need a servlet to download a file.



来源:https://stackoverflow.com/questions/23254196/smartgwt-gwt-show-a-pdf-on-client-side

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!