wood burning stoves 2.0*
The moose likes JSP and the fly likes Why will we write a custom tag, and not a JSPs fragment? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Why will we write a custom tag, and not a JSPs fragment?" Watch "Why will we write a custom tag, and not a JSPs fragment?" New topic
Author

Why will we write a custom tag, and not a JSPs fragment?

Tina Jain
Greenhorn

Joined: Mar 17, 2006
Posts: 23
Why will we write a custom tag, and not a JSPs fragment?

When both can do the same thing.

we all write custom tag, but can someone please explain why.

Thanks for your help.
Have a nice day.


If You Cannot Give Anything, At least Give A Smile.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

Scriptlets are evil and should be considered deprecated for JSP 2.0. Custom actions (tags) bring notational unity, encapsulation, and all other manner of OO goodness to the party.
[ December 05, 2006: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
graham king
Ranch Hand

Joined: Dec 30, 2004
Posts: 133
It's like asking yourself, "Why can't I re-write my code everywhere instead of reusing it from one place?"


write, revise, re-write, revise, again...<br />write, revise, re-write, revise, again...
Tina Jain
Greenhorn

Joined: Mar 17, 2006
Posts: 23

[ December 05, 2006: Message edited by: Tina Jain ]
Tina Jain
Greenhorn

Joined: Mar 17, 2006
Posts: 23
Thank you for your help.

Have a nice day.
 
Don't get me started about those stupid light bulbs.
 
subject: Why will we write a custom tag, and not a JSPs fragment?
 
Similar Threads
jsp include
Getting Page Source In The Servlet
Is it possible to modify JSTL libraries
"tld" file,"tag" file and "cutsom tag"
Implementing fragment caching with JSP tags