Suppose you're writing a jsp page that is meant to use certain tags out of a given taglib. And what if the jsp page uses tags that do not exist in any imported taglib...? Maybe you are inadvertently importing an older version of the taglib. Will those tags will simply not generate any visible output on the screen? How could you detect the missing tag code and redirect the user to a page that says.. "hey, you have to install the xxxxxx taglib." ?
Sun Certified Java Programmer for the Java2(tm) Platform<br />IBM Certified Solution Developer, WebSphere 3.5
Joined: Nov 22, 2001
In event of usage of wrong version of taglib, compiling of JSP page itself will be a problem
Joined: Apr 03, 2003
If you attempt to use a tag that the compiler cannot find in a tag library due to not import the taglib directive it resides in or if the .tld file doesn't contain the tag you are attempting to use, the comiler should complain that it knows nothing about the tag you are using and throw an error.
sharp shooter, and author
Joined: May 10, 2000
If you're using an incorrect prefix, then the compiler has no way of telling since those tags might actually be a part of your output. After all, you could be using JSP to generate XML instead of HTML. However, if you've got the prefix correct and the tag name incorrect, you will get an error from the JSP compiler. If you really want to add some validation to the page, to check for old versions of tags for example, check out the TagLibraryValidator class from the javax.servlet.jsp.tagext package. HTH Simon