English 中文(简体)
贵方建议与格朗西州批准档案的最佳做法是什么?
原标题:What best practice do you recommend for files authorization with GWT?
  • 时间:2011-04-14 16:13:57
  •  标签:
  • gwt
  • file

我想在我的网页上显示pdf的档案,我正在使用WT。

这份简单的法典可以:

Frame frame = new Frame();
frame.setUrl("http://127.0.0.1:8888/documents/file.pdf");

然而,我认为无法管理授权,因为所有拥有《欧洲权利公约》的人都可以看到《欧洲权利公约》的文件。

贵方建议如何利用与德国WT的档案处理这一授权问题?

最佳回答

最容易的方法是将文件转换成基64,在客户中使用单体。

<iframe src="data:application/pdf;base64,d2luZG93LmFsZX..."/>
问题回答

如果从Java servlet集装箱(例如Tomcat、Jetty、......)直接送达你的pdf档案,你可以使用Serlet Filter,检查。

  1. If the client is logged in (using a HTTP session) and
  2. If the user has the permission to load the file.

http://www.developer.com/security/article.php/3467801/Securing-J2EE-Applications-with-a-Servlet-Filter.htm”rel=“nofollow” http://www.developer.com/security/article.php/3467801/Securing-J2EE-Applications-with-a-Servlet-Filter.htm 作为起点——并适应你的要求(例如,你不必像提交人那样使用春天)。

不能过滤(从@Chris的建议来看),你就可以在网络xml中界定的安全限制背后下载服务器。





相关问题
How can I load a folders files into a ListView?

I d like to have a user select a folder with the FolderBrowserDialog and have the files loaded into the ListView. My intention is to make a little playlist of sorts so I have to modify a couple of ...

File Handling Issue

I am developing a tool in c#, at one instance I start writing into a xml file continuously using my tool,when i suddenly restart my machine the particular xml file gets corrupted, what is the reason ...

C# GemBox Excel Import Error

I am trying to import an excel file into a data table using GemBox and I keep getting this error: Invalid data value when extracting to DataTable at SourceRowIndex: 1, and SourceColumnIndex: 1. As ...

Saving output of a for-loop to file

I have opened a file with blast results and printed out the hits in fasta format to the screen. The code looks like this: result_handle = open("/Users/jonbra/Desktop/my_blast.xml") from Bio.Blast ...

热门标签