jQuery in Action, 3rd edition
The moose likes JSP and the fly likes Error using Tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Error using Tag " Watch "Error using Tag " New topic

Error using Tag

Shalu Ban
Ranch Hand

Joined: Feb 18, 2003
Posts: 72
Hi ,
I am using Tomcat 4.0, i created a custom tag to be used in a JSP page I created a tld file and kept in the WEB-INF folder. When i run the JSP page it gives me the following exception:
org.apache.jasper.JasperException: No such tag in the tag library imported with prefix shalu
I searched a bit on net and found that the likely problem is because i am using Tomcat 4.0. Upgrading to Tomcat 5 might solve my problem. In one article i found that modifying the web.xml file of Tomcat's conf directory to look like this would solve my problem:
I modified the web.xml file and saved it. Restarted Tomcat. But when i accessed the JSP page it gave me the same error.
Is upgrading my Tomcat the only solution? Does Tomcat 4.0 not support a simple customt tag??

Happiness is doing what is right.
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
You need to make sure that you have used the correct directive that states that you can use the tag in your JSP file.

Without knowing what the error is that you are receiving, or the JSP page that have created, this is only a guess.

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63852

JSP 1.2 custom actions work just fine in Tomcat 4. No need to upgrade just to use them. The only reason you'd need to upgrade to Tomcat 5 is to use JSP 2.0 custom actions.
The fragment of web.xml you showed us contains nothing to do with custom actions.
What would be more relevant is to show us the tld and the taglib directive from your JSP.

[Asking smart questions] [About Bear] [Books by Bear]
Shalu Ban
Ranch Hand

Joined: Feb 18, 2003
Posts: 72
Yeah! you guys are right. it was a mistake in the JSP page. I corrected it and its working fine now. thanks!
I agree. Here's the link: http://aspose.com/file-tools
subject: Error using Tag
It's not a secret anymore!