Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

why prints blank page

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<jsp:useBean id="temp" class="java.lang.String" />
<% out.println(temp); %>
 
Mahesh Mamani
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
The value of the id which you r trying to print is null. Hence the blank page.
If u try <% out.println(temp+"oooo"); %>, then "oooo" printed which suggestst that value of temp is null.
Check the generated class-file for details...

Mahesh
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if null then should'nt it print null..
for eg in java programs it prints "null" so does it mean it is equivalent to a blank page in web bpage thru JSP
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!