This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes JSP and the fly likes Scripting in Simple and Custom Tag Body Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "Scripting in Simple and Custom Tag Body" Watch "Scripting in Simple and Custom Tag Body" New topic
Author

Scripting in Simple and Custom Tag Body

stephen dimitrov
Greenhorn

Joined: Feb 28, 2005
Posts: 16
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
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61315
    
  66

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 ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
stephen dimitrov
Greenhorn

Joined: Feb 28, 2005
Posts: 16
Thanks! BTW, I used to have a V-Star
 
GeeCON Prague 2014
 
subject: Scripting in Simple and Custom Tag Body