File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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: 61095
    
  66

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Why will we write a custom tag, and not a JSPs fragment?