Hello
> 1) Tomcat for Linux does not pop up a new console, like in windows, so I
> cannot watch my debug messages and/or exceptions.
>
> 2) Servlets that need to write a file, work fine on windows, but cannot
> write the file on Linux. Permissions etc are ok (root, rw). And because of
> problems 1, I cannot figure out where the problem is.
I do not know how to display a console window in Linux, but you could write
debug messages to the log files.
The Tomcat log files are located in the CONTAINER_HOME/logs directory.
To print out debugging statements in Servlets use the GenericServlet.log()
method. Within HttpServlets all you have to do is call "log(...)". Here is
an example which presupposes it is within a 'catch' block in which an
IOException called "exception" has been caught:
log( "Connection Error" + exception.getMessage() );
To print out debugging statements in JSPs use the ServletContext.log()
method. JSPs automatically inherit a reference to their ServletContext in
the built-in object called "application". All you have to do is call
"application.log(...)" within a Java code block in your JSPs. Hence, the
previous example would be written as follows:
application.log( "Connection Error" + exception.getMessage() );
With a bit of luck you should be able to open log files in your favourite
text editor and monitor the printouts as they occur. (Try setting the editor
so that it automatically refreshes itself.)
Regards
Harry Mantheakis
London, UK
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]