Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Mock Exam Question

 
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got the following question in a site:

Which of the following statements are true of custom tags that are created by extending the SimpleTagSupport class.
Choose one answer.
a. Such tags cannot manipulate the content of the body
b. Such tags cannot have a bodycontent type of JSP
c. Such tags do not need to be defined with a TLD file
d. Such tags may contain JSTL expressions within the body
e. Such tags cannot contain EL expressions within the body

Answer: d



I think option (b) is also correct. What is your opinion?
 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess you can have JSP as a body-content inside simple tags.
 
arch rival
Posts: 2813
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think opinion comes into it. What happened when you attempted to create a custom tag that extended SimpleTagSupport and gave it a bodycontent type of JSP?
 
Tridib Samanta
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If "JSP" is specified as the body-content of SimpleTag, the following translation time error occurs:

an invalid body-content (JSP) for a SimpleTag.

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
body content of jsp is not allowed in a SimpleTagSupport class the reason is that SimpleTagSupport cannot have scripting in the body. body content type of JSP allows for scripting. You can only have:

1. empty
2. tagdependent
3. scriptless
[ April 02, 2007: Message edited by: Clifton Eaton ]
 
I can't beleive you just said that. Now I need to calm down with this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic