Send an Array with an HTTP Get

I know this post is really old, but I have to reply because although BalusC’s answer is marked as correct, it’s not completely correct. You have to write the query adding “[]” to foo like this: foo[]=val1&foo[]=val2&foo[]=val3

Best GWT widget library? [closed]

Do not bind yourself to ANY of these libraries. Use Vanilla GWT to create the structure of your project. In particular, use the MVP pattern and an Event Bus. Please, see google article to know how to best design your client application with GWT: Building MVP apps After, you can use any widget of these … Read more

Interface/enum listing standard mime-type constants

From https://docs.oracle.com/javaee/7/api/javax/ws/rs/core/MediaType.html : staticjava.lang.String APPLICATION_ATOM_XML “application/atom+xml” staticMediaType APPLICATION_ATOM_XML_TYPE “application/atom+xml” staticjava.lang.String APPLICATION_FORM_URLENCODED “application/x-www-form-urlencoded” staticMediaType APPLICATION_FORM_URLENCODED_TYPE “application/x-www-form-urlencoded” staticjava.lang.String APPLICATION_JSON “application/json” staticMediaType APPLICATION_JSON_TYPE “application/json” staticjava.lang.String APPLICATION_OCTET_STREAM “application/octet-stream” staticMediaType APPLICATION_OCTET_STREAM_TYPE “application/octet-stream” staticjava.lang.String APPLICATION_SVG_XML “application/svg+xml” staticMediaType APPLICATION_SVG_XML_TYPE “application/svg+xml” staticjava.lang.String APPLICATION_XHTML_XML “application/xhtml+xml” staticMediaType APPLICATION_XHTML_XML_TYPE “application/xhtml+xml” staticjava.lang.String APPLICATION_XML “application/xml” staticMediaType APPLICATION_XML_TYPE “application/xml” staticjava.lang.String MEDIA_TYPE_WILDCARD The value of a type or subtype wildcard: … Read more

How do I pass a class as a parameter in Java?

public void foo(Class c){ try { Object ob = c.newInstance(); } catch (InstantiationException ex) { Logger.getLogger(App.class.getName()).log(Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { Logger.getLogger(App.class.getName()).log(Level.SEVERE, null, ex); } } Here are some good examples on Reflection API How to invoke method using reflection import java.lang.reflect.*; public class method2 { public int add(int a, int b) { … Read more

Biggest GWT Pitfalls? [closed]

I’ll start by saying that I’m a massive GWT fan, but yes there are many pitfalls, but most if not all we were able to overcome: Problem: Long compile times, as your project grows so does the amount of time it takes to compile it. I’ve heard of reports of 20 minute compiles, but mine … Read more

What is the meaning of double tilde (~~) in Java?

In Java, it means nothing. But that comment says that the line is specifically for GWT, which is a way to compile Java to JavaScript. In JavaScript, integers are kind of like doubles-that-act-as-integers. They have a max value of 2^53, for instance. But bitwise operators treat numbers as if they’re 32-bit, which is exactly what … Read more

How do I speed up the gwt compiler?

Let’s start with the uncomfortable truth: GWT compiler performance is really lousy. You can use some hacks here and there, but you’re not going to get significantly better performance. A nice performance hack you can do is to compile for only specific browsers, by inserting the following line in your gwt.xml: <define-property name=”user.agent” values=”ie6,gecko,gecko1_8″></define-property> or … Read more