gwt

How to use web.xml or call servlet init() when using GWTTestCase

How do I get GWT to read web.xml file when doing unit testing. I'm of course using GWTTestCase class and I have to specify any servlets to use in module.gwt.xml file using <servlet path=.../>. The actual requirement is to load other servlets that initialize resources (using GenericServlet.init() method) in order to make the tests run...

It's possible to use GWT in a Jruby app?

It's possible to use GWT in a Jruby app? ...

Recomendation tech for adding web to a java application

I am new in web development world (from microcontrollers to web is a really long path) Having a Java software (.jar) running, it's just a background process sending/receiving info through sockets, with no interface. I would like to make a web interface to it, and I need some guidelines, about how to confront these topics The cod...

Comprehensive Pros/Cons of Mocking Frameworks for GWT

I'm interested in using the right mocking framework for my GWT app. It's my understanding that Mockito, EasyMock, and jMock are some of the most popular for Java. Could someone list pros/cons for the mocking framework that they are most familiar with as it relates to GWT to help fellow GWT testing noobs like myself? Thanks in advance. ...

Compile Error: Found widget in an HTML context Element

I've seen this answer but my I can't see what could possibly be the problem in my own code. Here is the my uibinding xml: <!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent"&gt; <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:g='urn:import:com.google.gwt.user.client.ui' xmlns:a='urn:import:com.google.gwt....

GWT returns null in foreign function interface.

I have a div <div id="aDiv"></div> When I try Window.alert(RootPanel.get("aDiv").toString()); I get the element however, just after the above statement, when I alert(document.getElementById("aDiv")); It returns a null. Can someone explain the discrepancies? ...

GWT Launcher error because of huge classpath

Hi All, I am trying to run an GWT application which (unfortunately) has a huge classpath, because if which the GWT launcher fails to load and I get the following error : CreateProcess error=87, The parameter is incorrect. Does somebody know a workaround for this solution ? Thanks in advance.. ...

Getting Json data from another domain, within a proxy servlet.

Hi folks, I'm working on a GWT project, in which I have to fetch some JSON data from a real web-domain. Due to SOP policy, GWT fails to get those data. To address this, as suggested in GWT docs, I have created some proxy servlets within GWT, which in turn should call the actual JSON provider external url. Does anybody know how should ...

History management (Refresh Button)

Please give me idea about the management of data in GWT. I am using Gwt in my travel portal project and my web pages is related to previous page data but when i press the refresh button of browser's then my data is lost . so please inform me if there is any way to manage this problem. ...

GWT JSON cross-site request fails

imo i did everything according to the tutorial here Googles x-site /** * Make call to remote server. */ public native static void getJson(int requestId, String url, StockWatcher handler) /*-{ var callback = "callback" + requestId; // [1] Create a script element. var script = document.createElement("script"); ...

absolute path to the resources of the web application(GWT) on the container that hosts it.

I have a GWT app. Am deploying it in tomcat. Within the servlet i want to write some code to create a temporary file. Right now am using file = new File("./../webapps"+this.getThreadLocalRequest().getContextPath()+"/svg/temp/"+svgName); But this might not hold true for all web servers due to the 'webapps' hardcoding thing. Please help ...

Documentation for @UiHandler

I started to look into using GWT in combination with UiBuilder. I'm a bit puzzled about how you can use the @UiHandler(..) directive to make simple event handle code as written down in the GWT documentation: @UiHandler("button") void handleClick(ClickEvent e) { Window.alert("Hello, AJAX"); } In this case the method handleClick is us...

Advantages to using GWT over PHP

Hey all, I'm looking at creating a site for a start-up and I'm trying to decide if I want to build it with GWT. I've done alot of PHP before and would like to continue that but a colleague of mine suggested using GWT instead. I read the information that Google has published about it and I see that all of the scripting is Python. I've ne...

GWT: how do I check the response code after a file upload ?

I'm using a GWT FormPanel to upload a file; the file is processed on the server and I place the result on the client side. FormPanel works correctly, as in this question (How to get a submission result out of FormPanel), but what if the server responds a 404 or 500 ? How do I capture the http response after a file upload ? ...

Gwt Multiple Modules

How can I define multiple modules in gwt? If I create the second modules I get compiler error, but the compiler find automatic the two modules. I use gwt with maven... ...

How to ClientBundle in GWT?

Hello, I am using GWT ClientBundle for the first time. I wrote interface that extends it and here is the code: package edu.etf.fuzzy.client.login; import com.google.gwt.resources.client.ClientBundle; import com.google.gwt.resources.client.ImageResource; public interface Resources extends ClientBundle { @Source("logo_federacija.jpg"...

GWT - Hiding or showing a Div at runtime

I have a GWT App where I need to call a webservice to check whether the user signed in is an administrator - and then set the admin Div to visible (hidden by default) if the web service returns true. The problem is the program passes the check before the web service can return the result. It's looking something like this public class M...

Parse json with gwt 2.0

Hi all, i'm trying to parse JSON coming from a flow in my gwt 2.0 application. What is the best way ? Should I use javascriptobject ? JSonParser ? I'm lost with what I'm founding on the web because there's never the gwt version. String text = "{\"item\":[{\"Id\":\"1\",\"Name\":\"Bob\"},{\"Id\":\"2\",\"Name\":\"John\"},{\"Id\":\"3\",\"...

GWT and Jetty - HTTP method GET is not supported by this URL

Hi, I'm starting a servlet extending google's RemoteServiceServlet in Jetty. It did not work with this error: HTTP method GET is not supported by this URL I searched this error and found that RemoteServiceServlet does not implement doGet and doPost. I tried this link http://docs.codehaus.org/display/JETTY/GWT. It didn't work either. An...

GWT on GAE application with Web Services

I'm interested in building a Google Web Toolkit (GWT) application that will run on the Google App Engine (GAE). I'd also like to expose a web service that shares the same datastore and can receive posted data from a different web application hosted elsewhere. Would using Restlet be a good solution, or is there a simpler approach that do...