Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Directives cannot produce output ?

 
Manikandan Jayaraman
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • 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.
 
Shantanu Puranik
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic