• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Directives cannot produce output ?

 
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

In one of my J2eeCertificate questions it is mentioned that
"Directives do not produce any output into the current out stream."

Is that true? I thought include directive includes the content into the parent servlet at translation time and can add some response to the out stream.

Am I right? I hope we can produce output through this include directive.
 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Directives affects the whole Page.
So the contents of the servlet that is generated out of JSP will have impact of the directives.
The role of direcive ends here.
Now producing any output is the responsibility of the generated servlet.
So the use of directive, does not produce any direct output into the current out stream.
 
Manikandan Jayaraman
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Shantanu, Thanks!

For that matter even <%= Hello %> is just translated into the servlet as an out.println statement.

It is the responsibility of the servlet to produce the output. Right?

How do you differentiate the include directive with this.

I canNOT digest that directives dont directly produce output.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic