How to answer (if possible) on http to receive requests in GWT?

I would like to make an http request with my Android phone (I know how to do this) and get the file in return (or some other answer from the database on the server). Is it possible to do this in GWT (I just started reading tutorials) on the server side or will I need to learn PHP or sth. still? I saw this http://code.google.com/webtoolkit/doc/latest/DevGuideServerCommunication.html , but I don’t know if it needs this.

Many thanks!

0
source share
1 answer

What you need on the server side is a Servlet engine such as Jetty or Apache Tomcat (or one of many others). Then you would have to write your RPC call in accordance with the link you provided, and the Java server servlet (which the GWT expects from you) would read the file and transfer the data to the file back to the client. The GWT client part of the application will read the message asynchronously, and then do whatever.

For the server part, you need to know Java, I would suggest that you know that if you are programming GWT.

If you want to use something else, such as an existing HTTP service in PHP, then you will use RequestBuilder to create your message or send and send it to the server.

Keep in mind that everything in your client folder will be compiled into Javascript GWT. Therefore, although you are working on the same project, you are actually coding two different systems. One of which is in Java (server folder) and the part of the client that GWT translates into Javascript, which runs in the browser.

+1
source

All Articles