Tomcat 4.0.1 on Linux, system.out.prinln() not working

I recently installed Tomcat 4.0.1 on RH Linux 7.2 and I am trying to develop some servlet- and JSP-based applications. I've set up everything according to the instructions, however, I'm finding that when I put a system.out.println(somestring) statement in my servlet and I have a console window open, nothing is printed out on the command line.
In the past when I was using Tomcat 3.1 that was not a problem.
Thanks,
Ethan

err. did you check "catalina.out" in the logs
directory ?
rahulOK, I just did, and there's the output from my print statements. I didn't know that's where standard output goes. Thanks for the information.
Ethan

Similar Messages

  • System.out.println not working in Tomcat-4.1.x

    System.out.println not working in Tomcat-4.1.24. Any settings has to be enabled??? I am using tomcat for Solaris

    I think u can use ServletContext.log() to output info instased.

  • 32-bit JDK 7 System.out.println not working in IDE

    Hi folks,
    I have a 64-bit Windows 7 OS.
    Due to 3rd party library/jar dependencies, i had to install the 32-bit Java JDK 1.7 and Eclipse IDE.
    I also installed NetBeans.
    So i have a 64-bit OS and am running 32-bit Java JDK/JRE & IDEs.
    The problem I am having is that my program's System.out.println("...") statements are not outputting strings to either IDE debug console.
    Executing the compiled program from a command line/prompt produces the expected string output.
    The basic "Hello, World" program is enough to cause this behaviour to start occurring.
    I have not manually / intentionally changed any IDE-specific Debug Console or Windows environment settings.
    One caveat: This same environment has worked successfully in the past ?! Yes, this is one of those "..it worked last week & yesterday and today it isn't and i swear i didn't do anything..." issue.
    Thoughts ?

    Thanks for the reply.
    The 64-bit versions of Java & Eclipse were installed first.
    When i discovered I had to use the 32-bit versions, i un-installed the 64-bit ones & installed the 32-bits.
    Even after that initial un-install 64-bit/install 32-bit process, it was working.
    I have also been installing the Windows 7 64-bit OS updates when i am informed of them.
    I'm not sure if any of these would affect how the Eclipse / NetBeans IDEs behave.
    Behaviour has been inconsistent.
    Initially it was always working.
    But over the past several days, it has been working less and less.
    I don't have any large data structures.
    This isn't a large complicated program, couple hundred lines, so i highly doubt that i'm doing anything to the resources, but something has changed.
    The main project I am working on takes command line parameters, does some initial processing, produces output using System.out.printlns [SOP] then depending on the parameters, branches into 2 different processing paths, let's call them A & B. Each of these processing paths also use SOPs. When i run the program in the IDE going thru path A, sometimes the initial SOP statements will work and the SOP statements specific to path A will also work. If i immediately change the parameters to go thru path B & re-run it, not even the initial SOP statements before the branching decision work.
    I've tried doing System.flush()s too - no affect.
    I haven't tried the re-direction option to a file option you mentioned yet.
    It always works from a command prompt - that is telling me that the Java SOPs are working properly, correct ?
    Inside an Eclipse or NetBeans IDE, SOP output to the debug console is inconsistent.
    Running from a command prompt, the SOPs always work.
    It'd help to know if this an IDE issue, a Java issue, a Windows 7 issue so i can narrow down where to try and correct the situation.
    I have a Windows XP VM set up, i'll try running the program there and see if there's a difference.
    Thanks for your reply.

  • Tomcat Java Servlets, how to log System.out.println() messages

    I have recently installed a new (x86) Mac OS Xserve, and am porting some Java application Servlets from an existing older Mac OSX server. All the servlets were working (I am connecting via port 9006). I have carefully used the old JDK 1.4 compiler, edited my server.xml (for port 9006) and web.xml files, etc. The Tomcat example servlets work fine, and all my (other) servlets work fine, with one exception, where I get the typically vague "java.io.IOException: Server returned HTTP response code: 500" message.
    Trouble is, I cannot get the Java System.out.prinln statements to go to the Tomcat/logs/ log files (they are all there and updating with Tomcat HttpServlet messages), in order to properly debug.
    Is there a server.xml value somewhere I can make the change?
    On another minor (possibly related) point, does anyone know what the path info ='null' means in the Tomcat access log? e.g.,
    StandardContext[/my_servlets]: Mapped to servlet 'myServlet' with servlet path '/myServlet' and path info 'null'
    It is the only other suspicious message I get in all the logs.
    One other point: my java application that fails uses threads. All the individual classes that use the threads work when run interactively, but as soon as I call them from final Serlet class that extends HttpServlet, I get a null pointer exception. Is there something unique about the Tomcat 4.1 threading that could be causing it?
    I want to avoid upgrading to Tomcat 5 at this point, if I can avoid it. My applications are modest in scope, and the last time I upgraded to Tomcat 5, it took me days to get it working properly, and I lost all access to it from the Server Admin application.

    I have found a solution: Via the Tomcat Admin web page I set the Context field "Swallow Output" to "true".

  • System.out will not flush before input

    Hello everyone,
    I am using Netbeans 5.5, JDK6, and J2EE. I am new to the environment so I wrote a test application that would prompt a user to enter a string and then echo it. I have:
    String str = "";
    BufferedReader br = new BufferedReader(new nputStreamReader(System.in));
    System.out.print("Enter a string: ");
    System.out.flush();
    try
    str = br.readLine();
    catch(IOException ex)
    System.out.print(ex.toString());
    System.out.print(str);
    What is really bizarre is that System.out will NOT flush no matter what. My application will always ask for input before it even prompts the user for the string. This is what the output looks like when running:
    init:
    deps-jar:
    compile:
    run:
    hello
    Enter an string: hello
    BUILD SUCCESSFUL (total time: 5 seconds)
    Notice how I had to enter the string first? The only way that I have seen that it flushes is if I used println() instead of print. But what if I don't want the prompt to have an end line in it. This just seems like weird behavior. Also, I have tried using a Scanner for input and the results are the same. Not really sure what to do. Any help would be most appreciated. Thanks.

    are you running this inside netbeans as well? the "console" view in netbeans (and eclipse, and probably other IDEs) is not a real console, it's a GUI component that the IDE writes to. it's behaviour isn't guaranteed to act like a real console. I've seen this sort of thing on eclipse before, but never used netbeans. but it still stands that an IDE's console view isn't an actual console/terminal window. that may well be the root of the problem

  • System.out.println not showing up in the console

    Hi,
    I've some System.out.println statements in a static block in a Stateless
    Session Bean. I could not see these outputs in the Weblogic console. I'm
    using Weblogic 5.1 Any one faced this problem before? any help is
    appreciated.
    Thanks & Regards,
    Nithi.

    Take a look in the weblogic log files they might be redirecting std out.
    "Ryan LeCompte" <[email protected]> wrote:
    >
    Hello Nithi,
    I'm all out of ideas, unfortunately! However, check out the following
    links for
    some possible insight into the problem:
    http://groups.google.com/groups?q=System.out.println+5.1+WebLogic&start=60&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=3d3df18e%40newsgroups.bea.com&rnum=69
    http://groups.google.com/groups?q=System.out.println+5.1+WebLogic&start=70&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=3977417b%40newsgroups.bea.com&rnum=71
    http://groups.google.com/groups?q=System.out.println+5.1+WebLogic&start=200&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=3bc20346%241%40newsgroups.bea.com&rnum=209
    Best regards,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    "Nithi Rajan" <[email protected]> wrote:
    Hi Ryan,
    Thanks for your reply and sorry for the long silence. I was on vocation.
    Thre problem still remains.I'm very sure that the EJB
    is deployed by WebLogic as I'm able to call some methods.
    and I'm also calling EJB methods from Servlet. But my
    System.out.println statments work fine in the Servlet and
    not inside EJB (or anyother classes used by EJB).
    Any one has faced similar problems? BTW am using WebLogic 5.1
    Thanks in advance,
    Regards,
    Nithi.
    "Ryan LeCompte" <[email protected]> wrote in message
    news:[email protected]...
    Hello Nithi,
    I find it strange that your System.out.println statements are beingexecuted from
    within your servlets, but not in your stateless session bean. Are
    you
    positive
    that your EJB is being located and deployed by WebLogic? The statementsin
    your
    static { } block should be executed as soon as the WebLogic class
    loader
    finds
    the class and loads it into the JVM. I would suggest examining theconsole
    and
    try to determine if your EJB is in fact being deployed. Are you invokingmethods
    on the EJB inside of your servlets? Are you using any logging frameworkfrom within
    the EJBs which would redirect output to a file?
    Best regards,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    "Nithi Rajan" <[email protected]> wrote:
    Hi Ryan,
    Thanks for your reply. The setting in the weblogic.properties is
    as
    follows.
    weblogic.system.enableConsole=true
    So, that tells me that I should see all the System.out.printlns right?
    (Pleasecorrect me if I'm wrong). I can see all the System.out.println
    from
    my
    servletand not from the Session Bean (even if the System.out.println
    is
    outside
    static block).
    Please let me know your thoughts.
    Thanks & Regards,
    Nithi.
    "Ryan LeCompte" <[email protected]> wrote in message
    news:[email protected]...
    Hello Nithi,
    Are you sure that you don't have WebLogic configured to redirect
    all
    messages
    to a file instead of the console? Are you able to see yourSystem.out.println
    statements when placed within other methods of your stateless sessionbean? Please
    be a bit more specific.
    Thank you,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    "Nithi Rajan" <[email protected]> wrote:
    Hi,
    I've some System.out.println statements in a static block in a
    Stateless
    Session Bean. I could not see these outputs in the Weblogic console.
    I'm
    using Weblogic 5.1 Any one faced this problem before? any helpis
    appreciated.
    Thanks & Regards,
    Nithi.

  • In my system facebook is not working plz hepl me out fast

    sir in my system Facebook is not working plz sir help me out fast plllzz

    At 1st click the Facebook
    button in the toolbar
    and select Remove
    from Firefox.
    Then You will see a
    confirmation dialog
    asking if you are sure
    you want to remove
    the feature. Click
    Remove Facebook
    Messenger to
    completely disable it.
    After that Messenger should be
    completely disabled.
    Then Log in to your
    Facebook account at
    facebook.com and Visit facebook.com/
    about/messenger-
    for-firefox
    then Click the green Turn
    On button. The
    messenger sidebar
    will open and
    confirmation
    message will be
    shown.and Click OK in the
    confirmation
    message to turn the
    feature on.

  • Why System.out.println not PrintStream.println ?

    Hi, just a beginner question
    I just wonder why should we use System.out.println, not PrintStream.println ?
    the field out in the System class is the instance of PrintStream class, isn't it?
    So why don't we just use the PrintStream class directly?
    Thanks..
    Edited by: riff_almighty on Oct 27, 2007 3:27 AM

    According to the api:
    A PrintStream adds functionality to another output stream, namely the ability to print representations of various data values conveniently. Two other features are provided as well. Unlike other output streams, a PrintStream never throws an IOException; instead, exceptional situations merely set an internal flag that can be tested via the checkError method. Optionally, a PrintStream can be created so as to flush automatically; this means that the flush method is automatically invoked after a byte array is written, one of the println methods is invoked, or a newline character or byte ('\n') is written.
    So there is nowhere mentioned about the PrintStream associated with the user console. System.out is the one instance of PrintStream which is associated with the console...
    Also println() is not a static method and cant be called upon the class...
    Edited by: VijayBabu on Oct 27, 2007 12:51 AM

  • DVI video out suddenly not working.

    That's basically it. I have a 23-inch Cinema HD Display at home and at the the office. Suddenly the video out is not working with either of them. The displays control panel lists the external display, so the system is detecting the connected display.
    There is nothing wrong with the displays. I connected an old PowerBook and they light up fine. With my MBP, the power light lights, but nothing is displayed on the Screen.

    there's a somewhat similar thread "external monitor stopped working" with no answers
    my 17" Studio display works as 2nd mon on other computers
    my dvi out does work with a vga monitor and adapter, of course :))
    i'm using the dvi to adc adapter -- could this be involved somehow?
    my laptop display goes blue when i plug in the external monitor as it should, but the 2nd monitor never wakes up, turns on, etc.

  • Systems preferences does not work

    My Systems Preferences does not work, either reminders and messages... since Mavericks(10.9) Programs do not respond and Macbook air is not responding....  Help.....

    Well, you are certainly correct that the fact that the "wired" machines work sure doesn't rule out a faulty router....But that's why (as part of a process of elimination troubleshooting scheme) I hooked up my old Linksys Router, and got the same results. Now...What are the odds of 2 separate routers acting the same way? Especially when both worked fine on my TIPB and even on my MBP until a few months ago. Plus, my 12 year old son can pull a wireless signal from the router on his console games (xbox360, Wii, PS3) with no problem
    Believe me, my first thought was to go out and buy another router, but when I swapped routers and got the same problem, I began to look elsewhere, eventually coming here for help and knowledge.
    I did the SMC reset to no avail. I'm not sure about the stuff in System Configuration....By "pull" do you mean to delete all the files in this folder? Move them to a temporary folder? Should I just deal with the folders that have "IP" in the "bundle" file name?
    Any help would be greatly appreciated!
    G5 Dual / G4 TiPB / MBP 2.0 / 2.0   Mac OS X (10.4.8)   23" Cinema Display and 8 gig on G5 Dual
    G5 Dual / G4 TiPB / MBP 2.0 / 2.0   Mac OS X (10.4.7)   23" Cinema Display and 8 gig on G5 Dual

  • Zoom in and out is not working in folders after installing Lion OS

    Zoom in and out is not working in folders after installing Lion OS. Did not understand why?

    Feature has been removed AFAIK. As far as zoom is concerned, the new operating system has been..whatever the opposite of optimized is...pessimized?

  • Macbook Pro 2011 DVI HDMI out does not work with TV when the power cable is connected

    My Macbook Pro (Early 2011) DVI HDMI out does not work with TV when the power cable is connected. If get the blue screen and then can use the macbook but nothing is displayed on the TV. If i go into display I can see that there are two screens but nothing displayed on the TV. If i take the power cable out at this point the TV shows the second desktop as expected. If i then reconnect the cable, the screen flickers, as though it is being affected by the power cable, and the screen goes blank on the TV. Only if i remove the DVI cable do i get the blue screen again. If i remove the power cable and reconnect it will do it every single time, so i cannot see it being a TV issue or a minor glitch.
    I have had this working previously but at the minute it seems to not be playing ball....any thoughts
    Thanks
    Dan

    BUMP
    Any ideas?

  • Satellite 1800-100: video-out does not work

    He,
    I just installed windows XP on my old Satellite 1800-100, but now my video-out does not work anymore. So I just downloaded the latest driver, but there's no way I can get it installed. According to Windows the new driver isn't newer, so it won't let me update it. And when i try to unistall the display driver, I have to reboot before it takes effect, and wile rebooting it automaticly installs the standard driver again.
    Can anybody help me?
    Greets,
    Daan

    Hi
    Do you mean TV- out port or monitor port? As far as I know this unit is preinstalled with WXP Home and all drivers can be also used for WXP Pro.
    Did you preinstall your own OS (non recovery image)?

  • HP Pavilion dv6-6181TX. System Recovery is not working From HP Recovery Manager.

    HP Pavilion dv6-6181TX
    Product No. A3U49PA
    Genuine Windows 7 Home Premium 64
    (but i upgraded it to windows 7 ultimate)
    System Recovery is not working From HP Recovery Manager. so i cant restore my laptop to its original factory condition. (Genuine Windows 7 Home Premium).
    so when i restart my computer and press Esc and then choose F11 i get this message :
    "Windows failed to start. A recent hardware or software change might be the
    cause. To fix the problem:
    1. Insert your Windows installation disc and restart your computer.
    2. Choose your language settings, and then click "Next."
    3. Click "Repair your computer."
    If you do not have this disc, contact your system administrator or computer
    manufacturer for assistance.
    File: \Boot\BCD
    Status: 0xc0000225
    Info: An error occured while attempting to read the boot configuration data."
    i saw this from the forum
    http://h30434.www3.hp.com/t5/Notebook-Recovery/Hp-recovery-manager-problems/m-p/2395473/highlight/tr...
    Had the C partition been split/shrunk to form a new partition previously?
    Does disk management show the HDD as basic or dynamic? (Start>Right-click Computer>Manage>disk management on the left).
    If it has been switched to dynamic (Windows does this automatically when more than 4 partitions are present on the disk), then the F11 recovery partition won't function until it is restored to basic, but I would like to confirm that is the scenario before providing those steps.
    The Disk management shows that my HDD as Dynamic, what should i do then if this is the case and the possible solution to my problem?
    please help me & Thank you for your time,
    This question was solved.
    View Solution.

    If you have more than 4 partitions you will need to delete the extra partition/partitions, then convert the hdd back to Basic.
    Older versions of Partiton Wizard Free work: 
    http://www.sevenforums.com/tutorials/26829-convert-dynamic-disk-basic-disk.html
    ******Clicking the Thumbs-Up button is a way to say -Thanks!.******
    **Click Accept as Solution on a Reply that solves your issue to help others**

  • Check out is not working in jdevloper10g (Subverion10.1.3.41.57 )

    Check out is not working in jdevloper10g (Subverion10.1.3.41.57 )

    Check out is not working in jdevloper10g (Subverion10.1.3.41.57 )

Maybe you are looking for

  • Compare two Java Objects without Comparable / Comparator

    Hi Friends, I would like to compare two java objects (lots o attributes) without using Comparable / Comparator. Any suggestion/sample code would be helpful. Thanks, Sachin

  • Do I have too many wifi networks

    I could use some other opinions on my setup as  as I'm just not sure I've gone about this the right way over time.  I don't know if all these signals are creating conflicts or anything. For all referenced wifi/wireless signals, I have not limited to

  • How do I update the colors on a 2d pie chart after adding 3 new variables

    I have added 3 additional items to a 2d pie chart.  Unfortunately, when the data is displayed the recently added items are displayed with the SAME colors as the first 3 items in the chart.  I need all variables to display in distinctly DIFFERENT colo

  • Updating data in mulitple databases

    Hi, I have a requirement in my project to update the data in two databases, when user updates data in the screen and saves it. We are using stateless session EJB to call the DAO. The update is using normal JDBC update statement. If some thing goes wr

  • Problem installing WL 6.1 SP3 on Solaris 7 Intel

    Dear all, When I try to run the installation toolkit weblogic610sp3_sol.bin on Solaris 7 Intel, the following error occurs: "Error: can't find libjava.so." Then, I try to run the toolkit with the following command: sh weblogic610sp3_sol.bin LAX_VM $J