This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes In JSP + Jdbc web page can Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "In JSP + Jdbc web page can "System.out.println()" can be used?" Watch "In JSP + Jdbc web page can "System.out.println()" can be used?" New topic
Author

In JSP + Jdbc web page can "System.out.println()" can be used?

gyan kumar
Ranch Hand

Joined: Sep 28, 2011
Posts: 61
In below program


Is it correct to use System.out.println() or out.println should be used it I want to show on web page.
mgupta gupta
Greenhorn

Joined: Nov 09, 2011
Posts: 3

The correct way to show on web page is out.println(). System.out.println() will print result on server console not on web page.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
Several comments, no specific order:

You should not have Java code in JSP pages; put that in backing beans or servlets.

The JDBC/ODBC bridge driver you're using is not thread-safe; using it in web apps is bound to cause problems.

You should get in the habit of using a configurable logging system such as java.util.logging or log4j; System.out.println is OK for example code but not for production use.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: In JSP + Jdbc web page can "System.out.println()" can be used?
 
Similar Threads
Error while creating database connection
jsp and jdbc
connect my MySQl databse
Accessing Connection pool
How to connect to mysql database?