• 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

Scripting in Simple and Custom Tag Body

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm confused as to whether scripting is involved in the body of a Simple and/or Custom tag. According to Head First Servlets, a simple tag can have a <body-content> of 'JSP', meaning scripting is allowed in the body (see page 472). However, on page 512 it says that a JspFragment CAN NOT have any scripting. This is confusing since getJspBody() returns a JspFragment representing the tag body. So, my questions are:

1. How can a JspFragment represent a body with scripting if it can't have any scripting?

2. Can Simple and Classic tags have scripting in the body?

Thanks
 
Marshal
Posts: 67447
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am assuming that by "scripting" you are refering to scriplets and scriptlet expressions and not to EL expressions.

Classic tags can have scripting in their bodies. Tags implemented using SimpleTag cannot. This also measn that tag files cannot have scripting since they are implemented, by the container, as instances of SimpleTag.
[ May 12, 2005: Message edited by: Bear Bibeault ]
 
stephen dimitrov
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks! BTW, I used to have a V-Star
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic