• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Debugging GWT app running on external container

 
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Crusading Chameleon likes the size of this ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic