You need a taglib directive in your JSP file. Try adding something like:
<%@ taglib uri="yourTagLibURI" prefix="yourTagPrefix" %>
at the beginning of your JSP.
--
Martin Cooper
Tumbleweed Communications
At 06:27 PM 9/11/00 +0200, you wrote:
>Hi all,
>
>I have such an error and I don't know where to modify code:
>
>I have a servlet forwarding request to a JSP file.
>
>That file instantiate a Bean and use a tag with attributes.
>I need to evaluate the body tag more than once.
>
>Thks
>Leonardo
>
>°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
><jsp:useBean id="ListContainer" class="SimpleBean" />
><table>
><tr>
>
><provatag:ShowCategories name="CategoryName" type="String"
>Object_List_to_Show="<%= ListContainer.getCollectionCat_Prod() %>" >
> <td>
> <a href="/JSP/CategoryTag?ID=<%= CategoryName %>"><%=
>CategoryName %></a>
> </td>
></provatag:ShowCategories>
>
></tr>
></table>
>°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
>SimpleBean.java
> public Collection getCollectionCat_Prod()
> {
> Object id = null;
> this.loadCategories(id);
> Collection listcoll = this.getCollectionCategories();
> return listcoll;
> }
>°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
>ProvaTag.java
> /** This is a needed method since 'Object_List_to_Show' is a parameter
>
>of the tag 'ShowCategories'
> * @param
> */
> public void setObject_List_to_Show(Collection members)
> {
> if (members.size() > 0)
> iterator = members.iterator();
> }
>
> /** Executed at run-time when the tag is find
> */
> public int doStartTag() throws JspException {
> if(iterator == null)
> return SKIP_BODY;
> if(iterator.hasNext()) {
> pageContext.setAttribute(name, iterator.next());
> return EVAL_BODY_TAG;
> }
> else {
> return SKIP_BODY;
> }
> }
>
>
> /** Executed before the BodyContent has been evaluated .....
> */
> public void doInitBody() throws JspTagException {
> /* try
> {
> } catch (JspTagException e) {
> throw new JspTagException("InitTag: " +
>e.getMessage()); }
>
>°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
>firsttaglib.tld
><!DOCTYPE taglib
>PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
>"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
>
><!-- a tag library descriptor -->
>
><taglib>
> <!-- after this ..
> "http://java.sun.com/j2ee/dtds/jsptaglibrary_1_2.dtd"
> -->
>
> <tlibversion>1.0</tlibversion>
> <jspversion>1.1</jspversion>
> <shortname>provatag</shortname>
> <info>My first tag!
> </info>
>
> <tag>
> <name>ShowCategories</name>
> <tagclass>ProvaTag</tagclass>
> <bodycontent>JSP</bodycontent>
> <info>An iteration tag handler
> </info>
>
> <attribute>
> <name>name</name>
> <required>false/required>
> </attribute>
> <attribute>
> <name>type</name>
> <required>false</required>
> </attribute>
> <attribute>
> <name>group</name>
> <required>false</required>
> </attribute>
> <attribute>
> <name>Object_List_to_Show</name>
> <required>true</required>
> <rtexprvalue>true</rtexprvalue>
> </attribute>
>
> </tag>
>°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
>
>Error: 500
>
>Internal Servlet Error:
>
>org.apache.jasper.JasperException: Unable to open taglibrary
>firsttaglib.tld : Could not locate TLD META-INF/taglib.tld
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
--
Martin Cooper
Tumbleweed Communications
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets