简体   繁体   English

GWT中的文件处理(在服务器端)

[英]File handling in GWT(at server side)

I have some doubt regarding gwt file handling. 我对gwt文件处理有一些疑问。

  1. How to do file handling in gwt(at server side). 如何在gwt中进行文件处理(在服务器端)。 How to create simple file. 如何创建简单文件。 I mean which class is particularly used for CREATING and HANDLING it ?? 我的意思是哪个类特别用于创建和处理它?

  2. Where is the file created. 文件在哪里创建。 Is it under server package or somewhere else ?? 它是在服务器包下还是在其他地方?

  3. How to resolve serialization and serialization problem. 如何解决序列化和序列化问题。 ?? ??

GWT is a client-side technology. GWT是一种客户端技术。 It's server-agnostic (and can also be used client-only, eg mobile apps, Chrome apps, browser extensions). 它与服务器无关(也可以仅用于客户端,例如移动应用程序,Chrome应用程序,浏览器扩展)。 GWT-RPC and RequestFactory use Java servlets by default (nothing precludes implementing RequestFactory in other languages/technologies) but have otherwise no requirement or limitations. GWT-RPC和RequestFactory默认使用Java servlet(没有任何事情妨碍在其他语言/技术中实现RequestFactory),但没有其他要求或限制。

So, server-side, it's all just Java in most of the cases, and depends on your deployment target (eg AppEngine restricts what you can do, servlet containers can also have security policies in place, and you're of course dependent on authorizations at the filesystem level) 所以,在服务器端,在大多数情况下都只是Java,并且取决于你的部署目标(例如,AppEngine限制你可以做什么,servlet容器也可以有安全策略,你当然依赖于授权在文件系统级别)

Since GWT is a pure client-side technology you have all possible options like plain Servlets for example. 由于GWT是纯粹的客户端技术,因此您可以使用所有可能的选项,例如普通的Servlet。 You are not limited in any way in picking the upload approach. 您在选择上传方法时不受任何限制。

However, there is a number of open source projects, which make possible to use nice features like progress bars and multiple file uploads. 但是,有许多开源项目,可以使用很好的功能,如进度条和多个文件上传。 And those come integrated with some GWT widgets as well. 那些也与一些GWT小部件集成在一起。 Check this project for example http://code.google.com/p/gwtupload/ 检查此项目,例如http://code.google.com/p/gwtupload/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM