Help: What can make "System.out.println" not displaying anything?

Hello,
We have Portal 10g.
I have noticed a pb on the interpretation of existing JSP pages.
I simplified the code... and I noticed that even this command doesn't work :
<%
System.out.println("Hello World");
%>
Any idea ?
Is there any security ? permission I should get ?
JSP works fine on our old 8i environment ...
Thanks in advance for your help.
Olivier

Olivier,
between 8i and 10g are aeons of time (for computer technology). As far as I recall, in 8i came with a Apache and JServ module. This supported Servlets and JSP through a special Oracle implementation. After that OC4J as a J2EE container for EJBs and Servlets/JSPs was introduced.
Using JSPs with the database installation only is not advised anymore. You can use OC4J for that. But be aware that will require some changes in the configuration and deployment of JSPs.
HTH,
--olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

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.

  • 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

  • Is there a way to make system.out.println() scroll down as it goes?

    I am writing a program where I want to be able to read what's printed out in the console of my IDE through System.out.println() as the program runs/after the program runs. However, right now I run the program, the message prints out, and then when I go to read it the scroll bar is all the way up so I can see only the top of the print-out (the first thing printed out). Is there any way I can get the console to scroll along with the text, kind of like floating boxes you see on various websites for various reasons? In other words, can I get it so that when I look in the console at any given moment of the program running, I am looking at the newest text printed out (the text at the bottom of the "page")? Thank you!

    That would be an IDE problem and not a Java one. You could redirect output into a text file so you can read at your leisure and scroll up and down as much as you like.

  • 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.

  • 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.

  • What can be done about emails not displaying once downloaded?

    When I download email on iPad, it shows up in the left hand column along with the first line but on the page to the right, the content of the email does not show up. Address info does, but below that there is only a blank page.  Anything I could do to fix?  Thank you!

    Quit the Mail app then reset your iPad.
    Go to the Home screen and double click the Home button. That will reveal the row of recently used apps at the bottom of the screen. Tap and hold on the app in question until it wiggles and displays a minus sign. Tap the minus sign to actually quit the app. Then tap anywhere on the screen above that bottom row to return the screen to normal. Then reset your device. Press and hold the Home and Sleep buttons simultaneously ignoring the red slider should one appear until the Apple logo appears. Let go of the buttons and let the device restart. See if that fixes your problem.

  • System.out.println and Network Adapter problem

    Hello,
    I am encountering a 2 strange problems. I have 2 oracle application server instances, one dev and one production.
    The first problem is when I type System.out.println in the JSP's i am able to see the output in both \opmn\logs\oc4jinstance. But the System.out.println in the java classes or bean show up only in development logs but not in production box.
    Is there a setting I am missing here?
    The second problem is on our development machine the application works fine, but as soon as we deploy the application on production I encounter:
    could not open new connection: Io exception: The Network Adapter could not establish the connection
    I have a class called DBUtils, which uses a 3rd party library to get connections from the connection pool as below. Using JSP I call the getConnection(). On my dev Oracle Application Server Instance it works fine, but on production I get the error. Can it be there is a setting that I am missing on the production box?
    When I use a JSP and connect to the database without using the DBUtil class. I can connect to the database fine. Also using the DBUtil class with production oracle IP address on the development machine lets me connect with no problem, but production machine does not let me.
    public class DBUtils {
    static ConnectionPoolBean pool;
    static {
    System.out.println("DBUtils() - before connection pool bean");
    pool = new ConnectionPoolBean();
    pool.setDriverClassName("oracle.jdbc.driver.OracleDriver");
    pool.setdbURL("jdbc:oracle:thin:@IPADDRESS:PORT:SID");
    pool.setUser("USERNAME");
    pool.setPassword("PASSWORD");
    pool.setInitialConnections(1);
    pool.setIncrement(1);
    pool.setSoftMaxConnections(40);
    public static Connection getConnection() throws SQLException {
    System.out.println("Getting Oracle Connection");
    return pool.getConnection();
    public static void returnConnection(Connection conn) throws SQLException {
    System.out.println("Returning Connection");
    pool.returnConnection(conn);
    Thanks for your help in advance.

    Hi
    System.out.println is a method of PrintStream in IO which is used to print the output on console in java progs.Here in jsp ,the o/p is printed on server's console window.But out.println is totally different as, out is implicit object derived from JspWriter and is used sly to PrinWriter 's object is used in servlets.It's work is to write upon Browser.
    System.out.println() is normally used in jsp for debugging purposes only.
    Ashish

  • Functionality of System.out.println()

    Hello,
    can some one please explain me what happens
    an System.out.println(); is called
    for example when we are pass an Object reference of some class
    it prints the address
    what functionality is taking place internally.
    which methods are called.

    You can look for yourself. The source code for the classes in the core API is in src.zip in the JDK download.

  • System.out.println in Java Studio Creator 2

    Where do my debugging messages sent to System.out.println go?
    In my other installations of netbeans they went to a window in the IDE but I can't find them with JSC 2.

    you can use System.out.println("") to write something in output (which in web applications it is web application log file)
    also in creator you can use log("") to write something in output which again is the log file.
    you can view the log file by right click on server / view log file

  • Is it possible not to use System.out.println?

    Hi guyz,
    Can anyone tell me if there is a way not to use System.out.println but produce the output on the command prompt? I need to add two numbers which are accepted through the args(command prompt). I have to add them and show them on command prompt without using System.out.println. Can ANYONE HELP?

    Hi guyz,
    Can anyone tell me if there is a way not
    s a way not to use System.out.println but produce the
    output on the command prompt? I need to add two
    numbers which are accepted through the args(command
    prompt). I have to add them and show them on command
    prompt without using System.out.println. Can ANYONE
    HELP?Why can't you use System.out.println? What's the reason?
    Kaj

  • What is System.out.println ?

    Can anyone reconfirm me about System.out.println,
    I think this way : System is a Huge class which is the most super class to any object in the Java World. Out is a static Nested Class and println is a method. I came accross something called " PrintStream class" What is this ? Where is it located ?
    Thanks in Advance..

    sagararya wrote:
    Nope. It's a public static field that refers to an instance of PrintStream. Best not to just try and make up definitions of things, really
    ====================================================================================
    Public Static field... ok.... How can an instance become static ? Static field is not tagged to any object
    you mean to say like this :
    Class PrintStream { }
    Class Something {
    public static void main(String [] args)
    PrintStream out = new PrintStream();
    // How is the out static here ???Come on now really.
    You don't have a clue on any basics, so best to stop throwing terms around in the hope that you might generate some meaningful phrases. Or if you are going to do that at least have the common courtesy to add a healthy dollop of buzzwords (the chef recommends WSDL, dynamically, DAO, Singleton and IPv6) so that we'll know the level of management doublespeak we should be using to address your posts.
    If you ever feel like resolving your underlying issue do feel free to check out the link posted in reply #1. In fact here it is again for, presumably, your amusement but perhaps with luck your education as well [http://java.sun.com/docs/books/tutorial/java/index.html]

  • Tomcat Servlet: System.out.println in servlet not printing to catalina.out

    Hello friends ,
    When i m using System.out.println() in servlet its o/p should come in catalina.out but its not coming plz help me....one thing more can we replace exixting catalina.out file with new one...
    please Help me soon.
    Thanks

    go to[u] TOMCAT_DIR/config/server.xml.
    Open this xml file and find something like <Logger className="org.apache.catalina.logger.FileLogger"
                  prefix="catalina_log." suffix=".txt"
                  timestamp="true"/>and
    <Logger className="org.apache.catalina.logger.FileLogger"
                     directory="logs"  prefix="localhost_log." suffix=".txt"
                timestamp="true"/>You can change the log file name to another one.
    It's much better to use a logger tool like log4j (http://logging.apache.org/log4j/docs/download.html) then using a System.out.println()...
    hope that helps

  • How can I show a System.out.println(""); into a JSP?

    Is a simple doubt that would help me a lot to reach other thing that I wished reach with a JSP.
    Thank you!!!

    Hi!!!
    Thank you to answer me......my question�is because�my problem is a little more complicated��let me tell you�.
    My problem is that I wish to do some queries to a table of a Municipalities DB, I have read about that....and according with the exemples....my JSP...should be running and executing very well....but I haven�t had success with that...:(
    My JSP file is:
    <!doctype html public "-//w3c//dtd html 3.2//en">
    <html>
    <!-- Copyright (c) 1999-2000 by BEA Systems, Inc. All Rights Reserved.-->
    <head>
    <title>Query of Municipalities</title>
    </head>
    <body bgcolor=#FFFFFF>
    <font face="Helvetica">
    <h1>
    <font color=#DB1260>
    Municipalities List
    </font>
    </h1>
    <%@ page import="
    weblogic.db.jdbc.*,
    weblogic.html.*,
    java.sql.*
    " %>
    <p>
    <%
    Connection conn = null;
    try {
    Class.forName("weblogic.jdbc.pool.Driver").newInstance();
    conn = DriverManager.getConnection("jdbc:weblogic:pool:DESAPool");
    catch (Exception e) {
    e.printStackTrace();
    Statement stmt = conn.createStatement();
    stmt.execute("select * from cat_municipio");
    ResultSet rs = stmt.getResultSet();
    while (rs.next()) {
    System.out.println(rs.getInt("cve_municipio") + " - " + rs.getInt("cve_sepomex") + " - " + rs.getString("desc_municipio"));
    stmt.close();
    conn.close();
    %>
    <p>Please call Mary with any updates ASAP!
    <p>
    <font size=-1>Copyright (c) 1999-2000 by BEA Systems, Inc. All Rights Reserved.
    </font>
    </font>
    </body>
    </html>
    My result obtained is the following:
    Municipalities List
    Please call Mary with any updates ASAP!
    Copyright (c) 1999-2000 by BEA Systems, Inc. All Rights Reserved.
    I don�t obtain nothing.....is like DB table were without information......but in reality the DB table has information.....and I can obtain it with the following JSP:
    <!doctype html public "-//w3c//dtd html 3.2//en">
    <html>
    <!-- Copyright (c) 1999-2000 by BEA Systems, Inc. All Rights Reserved.-->
    <head>
    <title>Query of Municipalities</title>
    </head>
    <body bgcolor=#FFFFFF>
    <font face="Helvetica">
    <h1>
    <font color=#DB1260>
    Municipalities List
    </font>
    </h1>
    <%@ page import="
    weblogic.db.jdbc.*,
    weblogic.html.*,
    java.sql.*
    " %>
    <p>
    <%
    Connection conn = null;
    try {
    Class.forName("weblogic.jdbc.pool.Driver").newInstance();
    conn = DriverManager.getConnection("jdbc:weblogic:pool:DESAPool");
    // Fetch all records from the database in a TableDataSet
    DataSet dSet = new TableDataSet(conn, "cat_municipio").fetchRecords();
    TableElement tE = new TableElement(dSet);
    tE.setBorder(1);
    out.print(tE);
    } catch (SQLException sqle) {
    out.print("Sorry, the database is not available.");
    out.print("Exception: " + sqle);
    } catch (Exception e) {
    out.print("Exception occured: " + e);
    } finally {
    if(conn != null)
    try {
    conn.close();
    } catch(SQLException sqle) {}
    %>
    <p>Please call Mary with any updates ASAP!
    <p>
    <font size=-1>Copyright (c) 1999-2000 by BEA Systems, Inc. All Rights Reserved.
    </font>
    </font>
    </body>
    </html>
    and with this JSP I obtain all the following information:
    Municipalities List
    CVE_MUNICIPIO CVE_SEPOMEX DESC_MUNICIPIO
    1 1 ACAJETE
    2 2 ACATENO
    3 3 ACATLAN
    4 4 ACATZINGO
    5 5 ACTEOPAN
    Now...I need that the first JSP work very well, because...with that way...I can do queries and obtain the needed results for showing them in the Browser......
    So, I already find out�.that�any string that I send to the browser with System.out.println(); isn�t showed�.so it is the reason of my question�..how I can see my results of a query using a loop (like a for, while) resolving it....I think my problem would be resolved.
    So...I hope you understand me, and you could help me please...thanks.....
    Mary
    P.D. I also attempted with the following JSP...but the result is the same....I don�t obtain none result...
    <!doctype html public "-//w3c//dtd html 3.2//en">
    <html>
    <!-- Copyright (c) 1999-2000 by BEA Systems, Inc. All Rights Reserved.-->
    <head>
    <title>Query of Municipalities</title>
    </head>
    <body bgcolor=#FFFFFF>
    <font face="Helvetica">
    <h1>
    <font color=#DB1260>
    Municipalities List
    </font>
    </h1>
    <%@ page import="
    weblogic.db.jdbc.*,
    weblogic.html.*,
    java.sql.*
    " %>
    <p>
    <%
    Connection conn = null;
    try {
    Class.forName("weblogic.jdbc.pool.Driver").newInstance();
    conn = DriverManager.getConnection("jdbc:weblogic:pool:DESAPool");
    catch (Exception e) {
    e.printStackTrace();
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery("select CVE_MUNICIPIO, CVE_SEPOMEX, DESC_MUNICIPIO from cat_municipio");
    while (rs.next()) {
    System.out.println(rs.getInt(1) + " - " + rs.getInt(2) + " - " + rs.getString(3));
    rs.close();
    stmt.close();
    conn.close();
    %>
    <p>Please call Mary with any updates ASAP!
    <p>
    <font size=-1>Copyright (c) 1999-2000 by BEA Systems, Inc. All Rights Reserved.
    </font>
    </font>
    </body>
    </html>

  • System.out.println makes things work fine????

    I have a case where vector hasto be populated based on some condition. It is in a for loop.But it throws null pointer exception when i try to access the elements in the vector as its empty.So to check that i gave a System.out.println to check the values at the point of inserting the elements into the Vector.At this point it starts working fine.I got this problem 2-3 times.I checked if i missed out something.But that was not the case.A System.out.println was causing the values to be inserted into the vector. I then removed the SoPs and tried.It worked fine.Any Idea??????????this is causing headache for me.I am using eclipse and tomcat4.1 with jdk1.4.2

    Honestly roshan, "I checked if i missed out something" and similar just isn't
    enough.
    You need to post code. Not 1500 lines but a small example that others can
    compile and run to observe the behaviour that you observe.
    Constructing such an example often helps in solving a problem. If the problem
    goes away when you remove code that contains or calls the method in question
    that's a sign of where the problem may lie (Even if that code seems to be
    irrelevent).
    The task of constructing a small example like this is not always easy: but it's
    useful for you and essential for others.

Maybe you are looking for