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

Enthuware Question Query

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,
I came across this question in one of the enthuware mock exams

Assuming that a taglib directive of <%@ taglib prefix='abc' uri='http://abc.com/taglibX'> exists, what will be the output of the following code?
Given the body content is defined as tagdependent in the tld.

<abc:print>
<%= 3*4 %>
</abc:print>
(Assume that this tag just prints its body to the output.)

The answer given is <%= 3*4 %> with an explanation Since the body content of the tag is tagdependent, the body of the tag will not be processed by the JSP engine. It must be processed by the tag itself. In this case, it will get <%= 3*4%> as its body. So this is what it will output in the result.
My queries are :
(1) If we have an EL instead in the body say ${beanName.property} then will it be also printed as it is without evaluation ???
(2) My second query is how is the assumption mentioned relevant to the question (Assume that this tag just prints its body to the output.)

Can somebody help me over this ...
Thanks in advance.
 
Sheriff
Posts: 7413
1423
IntelliJ IDE jQuery Eclipse IDE Postgres Database Tomcat Server Chrome Google App Engine
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

My second query is how is the assumption mentioned relevant to the question (Assume that this tag just prints its body to the output.)

It says that the tag does nothing other than simply printing its body content.

If we have an EL instead in the body say ${beanName.property} then will it be also printed as it is without evaluation ???

Duhh! It's your turn. You *must* write your own program to test that yourself.
 
reply
    Bookmark Topic Watch Topic
  • New Topic