• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Debugging GWT app running on external container

 
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
I decided to reimplement some of my application (based Hibernate, Spring and WebWork) using GWT.
I coded my new GWT application then I deployed the application to
my Tomcat container.
My main problem is how to debug my application (the GWT parts)?
With the original GWT hosted mode, this is easy as the GWT application
will run on its own container, but what if the application is deployed
on an external containter?
Thanks for your time.
 
Marshal
Posts: 67279
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it exhibiting different behavior under Tomcat than in hosted mode?
 
Hussein Baghdadi
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure Sir.
My problem is my GWT application is compiled to JavaScript, no more Java code is avaliable.
In GWT host mode, the application is still at the Java code level (AFAIK).
Please correct me if I'm wrong.
 
author
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's true, currently in Hosted Mode you are still dealing with Java code; once compiled and deployed it is JavaScript code - I assume you are talking purely about the client side aspects?

But Bear's comment is also true - are you seeing different behaviour in your deployed version than in Hosted mode?

There are a couple of tactics you can try.

1) You can try running Hosted mode using an external server by adding the -noserver switch to the hosted mode command. This allows client side code to be debugged as normal, but server side code comes from your own server.

2) use -style PRETTY or -style DETAILED in the compilation script and this will produce more human readable JavaScript output which you can then put various JavaScript debug statements in and debug as JavaScript.

//Adam
 
author
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you suspect a JS problem you can compile the GWT code with the -pretty or -detailed (pretty plus some more) style switch. The resulting JS code will be a lot larger, but the method names in the JS will reflect the original Java class/method names.
 
Hussein Baghdadi
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

But Bear's comment is also true - are you seeing different behaviour in your deployed version than in Hosted mode?


My problem is I can't use Hosted mode since my GWT part should talk to other objects (the session object, the service layer ...)
I don't know how to use hte Hosted mode in my case since my application is deployed on external container, other than GWT built-in one.
This is why I'm building my application and compiling my GWT to JavaScript.
 
No matter how many women are assigned to the project, a pregnancy takes nine months. Much longer than this tiny ad:
create, convert, edit or print DOC and DOCX in Java
https://products.aspose.com/words/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!