• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

print.out vs System.out.print  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am attempting to create a bean the produces dynamic output to the called function from a JSP. I have the data producing the output but not sending it to the JSP. In JSP I could simply use the syntax out.print(variable), but in a bean I can't. Is it possible to extend a class to have the ability to use out.print? If so how? System.out.print does produce the desired effect but not to the HTML format. What's the difference?
Thanks in Advance,
Newbie Stewart
 
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stewart this is a JSP question, I'll move it there for you...
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stewart
In a JSP out is one of the implicit vaialbes created for you by the container. It is a variable of type JspWriter. It is associated with the PrintWriter object from the ServletResponse class so it writes to that output stream - ie the response that is sent to the browser. If you have a bean that is producing output that needs to be printed you can just send the output back to the JSP and have it print it to the browser.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!