Any ideas why? i'm using Netbeans 5.5.1 and i tried with the bundle
tomcat4 and tomcat 5.5 and glassfish and the error is the same
Thanks,
Thanks,
On 28 sep, 18:10, Peter Blazejewicz <peter.blazejew...@gmail.com>
wrote:
As Peter says, you can't use System.out in your final application - it
is not part of the emulated library, and doesn't really make sense to
make it so; where would JavaScript application running in a browser
write too?
The power of GWT is in that you can perform your development and
debugging in an IDE. Use the power of Netbeans/Eclipse/whatever IDE
to support your debugging rather than relying on system.outs.
If you feel you have to use system.out then that will only work in
hosted mode and your output will more than likely go to the IDEs
console (it certainly will not go to the hosted mode console) and
will, as you see break when you try and compile. To get output on the
hosted mode console use the GWT.log("your message here",null)
approach; but again this only works in hosted mode since all GWT.log()
calls will be dropped by the compiler.
If, as a last resort, you really really need to see "system.out" in
web mode (i.e. after you have compiled the code to JavaScript), then
you need to look into using a JavaScript logger and wrapping it with
JSNI, or search on this forum, maybe someone has done it for you.
My advice would be to rethink any debugging strategy and learn to use
your IDE's built in tools that will show you all the output you should
need rather than trying to use system.out.
//Adam
GWT.log() does nothing in script mode, and prints to the GWT window
during hosted mode.
If you want script-mode debugging, I suggest checking out firelog:
http://zwitserloot.com/tipit-gwtlib/example
If you want to trace something in hosted mode I suggest you use the
debugger within your ide rather than debug statements. It is a very
handy tool and allows you to step through the java code you have
written and displays the results in the hosted browser.
If you want more help on this feel free to email me.
Cheers
MC
I checked the URL that Reinier posted, but i dindt understant the app.
I'm gonna try the GWT.log to see what happend, because one of you say
that i can use GWT and the other said that i can't and i dont really
understand about hosted mode and script mode, im a newbe here lol, so
i would like to try everything that you suggest.
Thanks for the responses.
On 29 sep, 17:12, "werdafuc...@gmail.com" <werdafuc...@gmail.com>
wrote:
GWT.log will only work in Hosted mode (which is where you are
executing the java code through the GWT console - you'll know if you
are in this mode as you get two windows; one a console and one your
application running with a GWT logo in the top right). Any messages
will appear in the Hosted mode console, but you don't get much control
on granularity (i.e. it is not helpful like Log4J; with GWT.log() you
get all messages).
Once you compile your code into JavaScript you enter "web mode" (or
script mode as you say) where GWT.log will be compiled out - since you
can't write anything to file systems from JavaScript code (this
inability of JavaScript to write to file systems is the issue that
also stops System.out and java.io from working).
Reinier, I think, linked you to some code he has that allows a GWT
application to link to the FireBug tool in case you really want to
send out debug messages in the compiled code. I'm sure he can explain
what it does and how to use it if you need.
It still sounds though that you might benefit from using an IDE
debugger, where you say "keep track of a piece of code", that is
exactly what the IDE debugger will do for you; allowing you to suspend
code, step through code, examine variables etc.
Good Luck!
//Adam
Well im gonna try the FireLog thing scince i have it install shouldn't
be difficult to see what happen
My apologies for been too much dummy, i've been working with GWT like
2 weeks, and i haven't had the time to read about it, i just got the
framework and start using it.
Thanks for the support.