gwt

Delete files from blobstore using file serving URL

房东的猫 提交于 2019-12-23 20:45:32
问题 In my app (GWT on GAE) we are storing on our database the serving URL that is stored on blobstore. When user selects one of these files and clicks "delete", we need to delete the file from blobstore. This is our code, but it is not deleting the file at all: public void remove(String fileURL) { BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService(); String key = getBlobKeyFromURL(fileURL); BlobKey blobKey = new BlobKey(key); blobstoreService.delete(blobKey); } Where

How to show file in GWT client side, instead of Downloading:

强颜欢笑 提交于 2019-12-23 20:10:12
问题 I need little help to achieve this, in my app user can upload files to server and its stored as blob object, and now i need to show them to user up on there request. What I am up to is show in below code, On server side I put content to response: (This code is implemented based on this blog post WaterTalks) resp.setContentType("text/plain"); resp.setHeader("Content-Disposition", "attachment; filename=output.txt"); PrintWriter out = resp.getWriter(); out.println("This is the output content");

Does GWT have its own notion of classpath?

六月ゝ 毕业季﹏ 提交于 2019-12-23 20:01:08
问题 Does the GWT compiler have a notion of its own "classpath" that is separate from the normal compile-time classpath? Does a GWT app (and its internal workings) have the notion of its own classpath that is separate from the normal JRE runtime classpath? 回答1: GWT has the notion of modules. Each module does declare what packages are in its source path. Modules can extend other modules. Every Class the GWT compiles has to be in the source path of one module your main module extends from. The

Reading request parameters in Google App Engine with Java [duplicate]

℡╲_俬逩灬. 提交于 2019-12-23 19:53:36
问题 This question already has answers here : GWT: Capturing URL parameters in GET request (4 answers) Closed 6 years ago . I'm modifying the default project that Eclipse creates when you create a new project with Google Web Toolkit and Google App Engine. It is the GreetingService sample project. How can I read a request parameter in the client's .java file? For example, the current URL is http://127.0.0.1:8887/MyProj.html?gwt.codesvr=127.0.0.1&foo=bar and I want to use something like request

How to show file in GWT client side, instead of Downloading:

前提是你 提交于 2019-12-23 19:51:50
问题 I need little help to achieve this, in my app user can upload files to server and its stored as blob object, and now i need to show them to user up on there request. What I am up to is show in below code, On server side I put content to response: (This code is implemented based on this blog post WaterTalks) resp.setContentType("text/plain"); resp.setHeader("Content-Disposition", "attachment; filename=output.txt"); PrintWriter out = resp.getWriter(); out.println("This is the output content");

Convert gwt project into maven gwt project

时间秒杀一切 提交于 2019-12-23 19:44:51
问题 I want to convert a gwt project to a maven project. I did configure->convert to maven. That just created pom.xml and target folder inside my project. The folder structure remains the same because maven project structure is src->main->java. And then I want to create a war file, can anyone help me to do this work. 回答1: You do not have fully AUTOMagic solution for this. Steps after Configure->Convert to maven 1) Identify each library jar and version used in the project and add a corresponding

GWT problem with calling Java methods from JSNI

吃可爱长大的小学妹 提交于 2019-12-23 19:27:27
问题 I tried the example from google at this page: http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=DevGuideJavaFromJavaScript I want to be able to call a Java method from JSNI, but nothing happens. No errors but the methods are not called. However, I can modify the fields from my class. Here is the code I tried: package com.jsni.client; import com.google.gwt.core.client.EntryPoint; public class Testjsnii implements EntryPoint { String myInstanceField;

Using GWTquery with GWT

落花浮王杯 提交于 2019-12-23 19:24:58
问题 Can anyone tell me how to use GWTquery along with GWT? The GWTquery tutorial page mainly deals with how to use jQuery, it doesn't much explain how to embed it. If, for example, I want to use it with the default Stockwatcher app that comes with GWT, and use jQuery inside the java file just like the GWTquery tutorial says, where to install the jar file, and how to import it? 回答1: GWTquery does not use jQuery, it is jQuery-like API implemented in GWT and it does not require jquery.js file inside

Reading a very large local XML file using GWT

拥有回忆 提交于 2019-12-23 18:49:44
问题 I am building my first Java application using GWT which must read in data from a very large XML file. I am having issues when I try sending a request for the information in the file, and I'm not quite sure if it has to do with the size of the file, or my semantics. In my program I have the following: static final String xmlurl = "filename.xml"; String xmlData; ... public void onModuleLoad() { requestData(xmlurl); if(xmlData.equals("Error")){ // display error message return; } else { //

Suggest Addresses in a SuggestBox in GWT/Java

佐手、 提交于 2019-12-23 18:31:13
问题 I want to define a SuggestBox , which behaves like the search bar in Google Maps: When you begin to type, real addresses, starting with the typed letters, appear. I think, that I need to use the Geocoder.getLocations(String address, LocationCallback callback) method, but I have no idea how to connect this with the oracle, which is needed by the suggest box to produce its suggestions. Can you please give me ideas how do I connect the getLocations Method with the SuggestOracle ? 回答1: I solved