aspose file tools*
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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Error using Tag " Watch "Error using Tag " New topic
Author

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:
<servlet>
<servlet-name>jsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
<init-param>
<param-name>logVerbosityLevel</param-name>
<param-value>WARNING</param-value>
</init-param>
<init-param>
<param-name>enablePooling</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>
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.


Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61420
    
  67

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] [Bear's FrontMan] [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