Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

System.out.println - Hello World Example

843836Sep 29 2003 — edited Sep 30 2003
Hi All

I am using Apache Tomcat and trying t produce a simple output to the browser. Cannot get System.out.println to work. See code and out below:

begin code
<HTML>
<HEAD><TITLE>hello jsp</TITLE></HEAD>
<BODY>
<%@ page language='java' contentType='text/html' %>
<%
String message = "Hello World";
message = message + "\nAFTER";
System.out.println("BEFORE");
%>

<%= (message) %>
</BODY>
</HTML>
END code

--begin browser output

Hello World AFTER

end browser ouput

Would be grateful if someone could explain why the System.out.print statement cannot be seen in the browser output.

many thanks

Naresh


Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 28 2003
Added on Sep 29 2003
6 comments
489 views