• 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

How to log System.out.println in iplanet ?

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
iPlanet on what platform?
 
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
iPlanet Web Server or iPlanet App Server?
 
Lakshmi Geetha
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 247
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Gerry Giese
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 686
Mac
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
On 2000 put
Init fn="nt-console-init" stdout=console stderr=console line in magnus.conf
and everthing works fine.
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
try this
nohup ./start | tee -i logs/console &
cheers
Sandesh
 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic