• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to view " System.out.print("hai");" in jsp page

 
Rajesh Veluchamy
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting the output as "Hello World!".

why i am not getting the output of System.out.print();

while if i my code is like "<%=AcNo%>"
i am getting the output fine

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65522
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
System.out will output to the server's console. It is not appropriate for use in a JSP page. Use the normal JSP mechanisms.
 
shahidrasul shahid
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
not use System.out.println();

use only out.println();
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65522
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by shahidrasul shahid:
use only out.println();

Or better yet, follow modern best practices and avoid putting any Java code at all in the JSP
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!