• 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

question on Classic Tag

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,

Can any body tell me y the answer is A for the following question:

1.<%@ taglib uri="example" prefix="example"%>
2.<example:aTagWithABody>
3.<%="BODY CONTENT"%>
4.</example:aTagWithABody>
If the aTagWithABody tag extends javax.servlet.jsp.tagext.TagSupport,and answer 1 that tag's handler returns EVAL_BODY_BUFFERED from doStartTag,what is the result of processing the JSP code?

A. Compilation fails.
B. "BODY CONTENT" IS returned in the generated response.
C. "<%=BODY CONTENT%>" is returned in the generated response.
D. Because the tag's body content will be buffered, it will
not be returned in the generated response.

Answer: A
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi

i have tried that example on my local machine and its working fine.Also they havent specified what is the <body-content> in the the tld file. If we spcify that <body-content> as jsp then BODYCONTENT is a part of the output.But if we specify that it is tagdependent then that part wont be part of the output. I have tried this on the container which supports only 2.3 servlet specification and 1.2 jsp container specification.

I dont know if it behaves differently on servlet 2.4

Please correct me if i am wrong.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic