my dog learned polymorphism*
The moose likes JSP and the fly likes Prefix Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Prefix" Watch "Prefix" New topic


rakesh sugirtharaj
Ranch Hand

Joined: Dec 16, 2007
Posts: 151
What is the need for prefix in custom tags?

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60766

It is the means by which tags are associated with the specific library within which they are defined.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Christophe Verré

Joined: Nov 24, 2005
Posts: 14687

It is used to identity a library within a page. When you use a tag, you want to tell from which library it comes from. Imagine a scenario where you have two tags with the same name, but from from two different libraries. You need something to tell which tag is from which library, and that's what the prefix is for.

[My Blog]
All roads lead to JavaRanch
rakesh sugirtharaj
Ranch Hand

Joined: Dec 16, 2007
Posts: 151
Yup! Now i get it. Thanks.
I agree. Here's the link:
subject: Prefix
Similar Threads
Tomcat example jsp working. Example servlet not working
Change Namespace for Axis2
Error in validating xml file which has schema
Dojo + Struts ?
how to assign my function to onclick