gwt-rpc

How to get image with servlet and display it using GWT Image class?

一笑奈何 提交于 2019-11-27 06:59:35
问题 I'm using the following code as part of the GWT server-side class (servlet) for GWT-RPC. private void getImage() { HttpServletResponse res = this.getThreadLocalResponse(); try { // Set content type res.setContentType("image/png"); // Set content size File file = new File("C:\\Documents and Settings\\User\\image.png"); res.setContentLength((int) file.length()); // Open the file and output streams FileInputStream in = new FileInputStream(file); OutputStream out = res.getOutputStream(); // Copy

gwt - Using List<Serializable> in a RPC call?

て烟熏妆下的殇ゞ 提交于 2019-11-27 05:24:51
I have a RPC service with the following method: public List<Serializable> myMethod(TransactionCall call) {...} But I get a warning when this method is analyzed, and then the rpc call fails Analyzing 'my.project.package.myService' for serializable types Analyzing methods: public abstract java.util.List<java.io.Serializable> myMethod(my.project.package.TransactionCall call) Return type: java.util.List<java.io.Serializable> [...] java.io.Serializable Verifying instantiability (!) Checking all subtypes of Object wich qualify for serialization It seems I can't use Serializable for my List... I

Problems passing class objects through GWT RPC

本小妞迷上赌 提交于 2019-11-27 04:16:35
问题 I've run through the Google Web Toolkit StockWatcher Tutorial using Eclipse and the Google Plugin, and I'm attempting to make some basic changes to it so I can better understand the RPC framework. I've modified the "getStocks" method on the StockServiceImpl server-side class so that it returns an array of Stock objects instead of String objects. The application compiles perfectly, but the Google Web Toolkit is returning the following error: "No source code is available for type com.google.gwt

When should I use RequestFactory vs GWT-RPC?

元气小坏坏 提交于 2019-11-27 04:09:50
问题 I am trying to figure out if I should migrate my gwt-rpc calls to the new GWT2.1 RequestFactory cals. Google documentation vaguely mentions that RequestFactory is a better client-server communication method for "data-oriented services" What I can distill from the documentation is that there is a new Proxy class that simplifies the communication (you don't pass back and forth the actual entity but just the proxy, so it is lighter weight and easier to manage) Is that the whole point or am I

What is the purpose of the IsSerializable interface in GWT (regarding the RPC mechanism)

北城以北 提交于 2019-11-27 03:06:30
问题 What is the purpose of the IsSerializable interface in GWT (regarding the RPC mechanism). I have never been able to find a good explanation as to why it is the way it is and why the default Java Serializable tagging interface does not work. 回答1: Both Serializable and IsSerializable work, according to the GWT serialization docs: A user-defined class is serializable if all of the following apply: It is assignable to IsSerializable or Serializable, either because it directly implements one of

Super Dev mode in GWT

a 夏天 提交于 2019-11-26 15:57:10
I'm new to gwt. I don't know how to start up Super Dev mode . I need the detailed explanation step by step. I have tried editing gwt.xml file by adding <add-linker name="xsiframe"/> <set-configuration-property name="devModeRedirectEnabled" value="true"/> <set-property name="compiler.useSourceMaps" value="true" /> but i cant get the idea about this. Stuart Follow these steps, you 'll definitely find the solution. Download the GWT 2.5 RC2, and put it somewhere...I put it in my eclipse/plugins directory. link In Eclipse, add GWT 2.5 to the Project -> Properties -> Google -> Web Toolkit ->