This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Other Java Products and Servers and the fly likes How to log System.out.println in iplanet ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "How to log System.out.println in iplanet ?" Watch "How to log System.out.println in iplanet ?" New topic
Author

How to log System.out.println in iplanet ?

Lakshmi Geetha
Greenhorn

Joined: Mar 06, 2001
Posts: 16
Hi,
I have some jsp pages which use some java beans.
In my beans I am giving some System.out.printlns.
Where can I see them in iplanet ?
Thanks in advance.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

iPlanet on what platform?
Gerry Giese
Ranch Hand

Joined: Aug 02, 2001
Posts: 247
iPlanet Web Server or iPlanet App Server?


CJP (Certifiable Java Programmer), AMSE (Anti-Microsoft Software Engineer)
Author of Posts in the Saloon
Lakshmi Geetha
Greenhorn

Joined: Mar 06, 2001
Posts: 16
sorry , neglected to mention platform and other details.
the platform is UNIX (Solaris)
and it is for web server.
btw, where/how do i do it in NT ?
Gerry Giese
Ranch Hand

Joined: Aug 02, 2001
Posts: 247
Can't help with Web Server as I don't use it, only App Server.
On Solaris, iAS writes System.out.println() to std logs named 'kjs.XXXX', where the XXXX is the port number. On NT, I can't get System.out.println() working, so I write log messages to a file using a Logger class I wrote.
Sanjeev Agarwal
Greenhorn

Joined: Mar 13, 2002
Posts: 2
Hi Gerry,
On NT you can see all the <i>System.out.println("")</i> messages, here is the procedure to set that.
In Services window first stop the iAS application server, then double click on the application server 6.0, it will open another window, there will be a check box under "<b>Log On As:</b>" heading saying "<b>Allow Services to interact with Desktop</b>", just check that and press "Ok" and restart the application server.
It will open one <i>dos/cmd</i> windows for each engine process (<i>KAS/KXS/KJS/CXS</i>), and in the KJS window you can see all the <i>System.out.println("")</i> messages (please increase window buffer to see more lines in the window.
Hope this will help, for more questions please visit http://softwareforum.sun.com
Regards,
Sanjeev.


Try our New Web Based Forum at <a href="http://softwareforum.sun.com" target="_blank" rel="nofollow">http://softwareforum.sun.com</a>
Gerry Giese
Ranch Hand

Joined: Aug 02, 2001
Posts: 247
Ok, I need to amend my last post. I can't get System.out.println() working *resonably*. Having 5 DOS windows open up every boot and being unable to make them go away without shutting down the services is unreasonable.
Any app the opens lots of windows creates clutter and make it difficult to figure out where you are and work efficiently. Mind you, I'm working on *2* 19" monitors in high-res mode and already have my taskbar expanded up to two rows of tasks!!
I might have stuck with it if it weren't for one thing: after I position all the kXX windows where I want them, if I restart the server they close and then come back and position themselves where they want to, not where I left them last time. Restarting is essential to development because iAS doesn't always load/run the new code.
iPlanet really needs an interactive real-time log viewer for the windows platform, one that will show the System.out.println()s, but in the meantime I still recommend using a logging API to catch debug info at a minimum.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

The real kicker is:

i've seen iWS (web server!) swallow anything that you try to printout from a servlet using the very API that you are supposed to use! the log() method on the GenericServlet !

Other time's I've managed to catch System.out.println()'s from iWS.

They are,of course,completely inaccessible in all cases, but if you go to administer the iWS and you click 'Apply' then select "Start and Stop", it takes you to a page where a few things print out on the webpage... amazingly enough, if you have a few System.out.println's in the init method of a servlet that you have set to load-on-startup.. you will see these messages intermixed with iPlanet's startup messages.

But not in any log files!

And by the way, this is all on NT/2000. It doesn't seem to have these problems on Solaris.
Jignesh Patel
Ranch Hand

Joined: Nov 03, 2001
Posts: 626

On 2000 put
Init fn="nt-console-init" stdout=console stderr=console line in magnus.conf
and everthing works fine.
sandesh bangera
Greenhorn

Joined: Nov 13, 2002
Posts: 12
try this
nohup ./start | tee -i logs/console &
cheers
Sandesh
Bhupinder Dhillon
Ranch Hand

Joined: Oct 12, 2000
Posts: 124
Originally posted by j_kokil:
On 2000 put
Init fn="nt-console-init" stdout=console stderr=console line in magnus.conf
and everthing works fine.

It's the same in NT. BTW, the above works for iws 6 but for iws 4.x you need to put the same line in obj.conf file. You can also specify a file name if you don't like the consoles opening up. Here's how...
Init fn="nt-console-init" stdout="<filename>" stderr="<filename>"
You could also specify the same file name for both streams.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to log System.out.println in iplanet ?
 
Similar Threads
applet servlet communication in iplanet environment
Struts and iPlanet web server 6.1
using Iplanet as a webServer with wls
iplanet session time out
WAS 4.0 plugin-cfg parsing error