• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Question regarding tagdependent

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

What would be the output if the body-content of the tld is tagdependent, then the body of the tag has expression?

<my:Classic name="Chris Marlo Magpantay">
<%=3*4%>
</my:Classic>

The correct answer in the enthuware mock exam is "<%=3*4%>". But when I tried it my sample app, it outputed nothing or blank. Can somebody please explain this? Thanks!
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check the HTML source. You probably can't see it in the browser because it appears to be a tag.
 
Marlo Magpantay
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But in the exam, is the correct answer really "<%=3*4%>"?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Marlo Magpantay wrote:But in the exam, is the correct answer really "<%=3*4%>"?


If there were such a question, I'd say yes.
 
Marlo Magpantay
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Christophe!
 
Creator of Enthuware JWS+ V6
Posts: 3412
320
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Marlo ,

But in the exam, is the correct answer really "<%=3*4%>"?


It depends on the context of the question.

If the body-content of the tld is tagdependent the body <%=3*4%> is given to the tag handler code and it depends on that code if it outputs the body. If the tag handler code is not given in the question then the correct answer is that the body is not writen to the page. (by default it is not output)

Regards,
Frits
 
Marlo Magpantay
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Frits! I forgot to mention that the question said the tag handler code prints the body. So in that case, the correct answer is "<%=3*4%>".
 
reply
    Bookmark Topic Watch Topic
  • New Topic