System.out.println() is not working on Web mode

2,202 views
Skip to first unread message

Rocco

unread,
Jul 3, 2007, 2:22:08 PM7/3/07
to Google Web Toolkit
On the client side, I used to use "System.out.println()" function
for debugging client-side codes when running on Tomcat server
(Web mode), and without any problem. Now it stopped showing
any messages when calling such a function in the middle of running,
and I have to replace it with "Window.alert()" for debugging purpose.

Anyone has such a similar problem? Any fix/workaround?

Thanks.

Axel Kittenberger

unread,
Jul 3, 2007, 2:40:08 PM7/3/07
to Google Web Toolkit
Where would you expect the System.out.println() output to appear in
webmode?

Isaac Truett

unread,
Jul 3, 2007, 2:45:13 PM7/3/07
to Google-We...@googlegroups.com
GWT silently removes your System.out.* calls from client code. You'll
need to find another way to debug, such as breakpoints in hosted mode.

Rocco

unread,
Jul 3, 2007, 2:45:31 PM7/3/07
to Google Web Toolkit
On Windows XP's command prompt, I usually run "catalina.bat start"
to start the Tomcat server and another console, and where the
messages will be printed.

Axel Kittenberger

unread,
Jul 3, 2007, 3:11:17 PM7/3/07
to Google Web Toolkit
You expect on execute System.out.prinln() on clientside (speak: its
javascript in the browser), then to be transmitted to the server, and
then put into the server console?

Rocco

unread,
Jul 3, 2007, 3:54:28 PM7/3/07
to Google Web Toolkit
Sorry, I didn't make myself clear. I used "System.out.println()" on
the codes of "client". So it will be printed on the server's console.

Rocco

unread,
Jul 3, 2007, 4:11:11 PM7/3/07
to Google Web Toolkit
Sorry, I didn't make myself clear. I used "System.out.println()" on
the codes of "client". So it will be printed on the server's console.


On Jul 3, 12:11 pm, Axel Kittenberger <axe...@gmail.com> wrote:

Reinier Zwitserloot

unread,
Jul 3, 2007, 5:23:47 PM7/3/07
to Google Web Toolkit
Rocco, you're not remembering right. System.out.println() in any
client has ALWAYS BEEN ignored in web mode, since the inception of
GWT. They print to the console in hosted mode, and any
SYstem.out.printlns in servlets print where-ever they usually print,
GWT is client side technology.

Gerard Toonstra

unread,
Jul 3, 2007, 7:20:47 PM7/3/07
to Google Web Toolkit

Use GWT.log() instead to print in hosted mode server console.

Trenton D. Adams

unread,
Jul 3, 2007, 8:34:15 PM7/3/07
to Google-We...@googlegroups.com
GWT.log() doesn't work for me, as it displays nothing.  System.our.println() prints to the stdout of the console that ran the hosted mode environment.

Reinier Zwitserloot

unread,
Jul 4, 2007, 2:58:07 AM7/4/07
to Google Web Toolkit
GWT.log() also gets ignored in web-mode, I believe. It logs to the GFX
window with the log messages from GWT instead of the console.

Try http://www.zwitserloot.com/tipit-gwtlib/example for the FireLog
logger.

mumuri

unread,
Jul 4, 2007, 3:02:52 AM7/4/07
to Google Web Toolkit
you have to use Windows.alert() to display messages in web mode

On Jul 4, 8:58 am, Reinier Zwitserloot <reini...@gmail.com> wrote:
> GWT.log() also gets ignored in web-mode, I believe. It logs to the GFX
> window with the log messages from GWT instead of the console.
>

> Tryhttp://www.zwitserloot.com/tipit-gwtlib/examplefor the FireLog

Reinier Zwitserloot

unread,
Jul 4, 2007, 8:36:56 AM7/4/07
to Google Web Toolkit
... or FireBug logging or any of many other logging solutions.

I again refer you to http://www.zwitserloot.com/tipit-gwtlib/example
to see logging working in WEB mode.

On Jul 4, 9:02 am, mumuri <topfl...@gmail.com> wrote:
> you have to use Windows.alert() to display messages in web mode
>
> On Jul 4, 8:58 am, Reinier Zwitserloot <reini...@gmail.com> wrote:
>
> > GWT.log() also gets ignored in web-mode, I believe. It logs to the GFX
> > window with the log messages from GWT instead of the console.
>

> > Tryhttp://www.zwitserloot.com/tipit-gwtlib/exampleforthe FireLog

Reply all
Reply to author
Forward
0 new messages