Skip to Content

web.xml error

Hi,

I have make some tests with developping jsp with EP6

this is my little jsp :

<%@taglib uri="tagLib" prefix="hbj"%>

<hbj:content id="myContext">

<hbj:page title="HelloWorld">

<hbj:form>

<hbj:textView id ="welcome">

<center><h1><br>Hello World </br></h1></center>

</hbj:textView>

</hbj:form>

</hbj:page>

</hbj:content>

the following error appears :

Error in parsing taglib 'tagLib' tag in web.xml or .tld file of the taglib library..

must I modufy the web.xml file?

Regars

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 14, 2004 at 10:24 AM

    In file web.xml you must have:

    <taglib>

    <taglib-uri>

    tagLib

    </taglib-uri>

    <taglib-location>

    /WEB-INF/tlds/your_taglib.tld

    </taglib-location>

    </taglib>

    Then you could call the config "your_taglib.tld" file typing <%@taglib uri="tagLib" prefix="hbj" %>

    And in your "your_taglib.tld" file:

    <?xml version="1.0" encoding="ISO-8859-1" ?>

    <!DOCTYPE taglib PUBLIC

    "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"

    "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">

    <taglib>

    <tlibversion>1.0</tlibversion>

    <jspversion>1.1</jspversion>

    <shortname>Your Examples</shortname>

    <tag>

    <name>content</name>

    <tagclass>folder.TagClass</tagclass>

    <bodycontent>empty or whatever</bodycontent>

    <attribute>

    <name>id</name>

    <required>true</required>

    <rtexprvalue>true</rtexprvalue>

    </attribute>

    </tag>

    <!-- (...) others tags -->

    </taglib>

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 03, 2004 at 07:31 AM

    Hi my web-xml files is like this

    <?xml version="1.0" encoding="ISO-8859-1"?>

    <!DOCTYPE web-app

    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"

    "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

    <!--

    This is the servlet definition for the iView Runtime Java.

    -->

    <web-app>

    <display-name>The Java iView Runtime</display-name>

    <servlet>

    <servlet-name>prt</servlet-name>

    <servlet-class>com.sapportals.portal.prt.dispatcher.Dispatcher</servlet-class>

    <load-on-startup>1</load-on-startup>

    </servlet>

    <session-config>

    <session-timeout>30</session-timeout>

    </session-config>

    <welcome-file-list>

    <welcome-file>index.html</welcome-file>

    <welcome-file>index.jsp</welcome-file>

    </welcome-file-list>

    <taglib>

    <taglib-uri>/WEB-INF/tlds/spellcheck.tld</taglib-uri>

    <taglib-location>/WEB-INF/tlds/spellcheck.tld</taglib-location>

    </taglib>

    my JSP file is like this:

    <%@ taglib uri="/WEB-INF/tlds/spellcheck.tld" prefix="spell" %>

    <%@ taglib uri="tagLib" prefix="hbj" %>

    <hbj:content id="myContext" >

    <hbj:page title="PageTitle">

    <hbj:form id="myFormId" >

    kaushik

    <TABLE WIDTH="100%" CELLPADDING="2" CELLSPACING="0"

    BORDER="0" BORDERCOLOR="#000000">

    <TR ALIGN="center" HEIGHT = "20">

    <TD WIDTH="40%" ALIGN="RIGHT" VALIGN="TOP">

    <hbj:textView text="Comments" design="LABEL"/>

    </TD>

    <TD WIDTH="50%" ALIGN="left" VALIGN="TOP">

    <hbj:textEdit

    id="ZPXXNOTES0"

    text="Sample"

    wrapping="SOFT"

    rows="4"

    cols="30"

    />

    </TD>

    </TR>

    </TABLE>

    </hbj:form>

    </hbj:page>

    </hbj:content>

    </web-app>

    And following is my tld file:

    <?xml version="1.0" encoding="ISO-8859-1" ?>

    <!DOCTYPE web-app

    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"

    "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

    <taglib>

    <tlibversion>1.0</tlibversion>

    <jspversion>1.1</jspversion>

    <shortname>gillette-taglib</shortname>

    <info>

    A tag library for Gillette development

    </info>

    <tag>

    <name>spellcheck</name>

    <tagclass>gillette.taglib.GilletteSpellCheckTag</tagclass>

    <attribute>

    <name>input</name>

    <required>true</required>

    <rtexprvalue>true</rtexprvalue>

    </attribute>

    <attribute>

    <name>suggestionSetSize</name>

    <rtexprvalue>true</rtexprvalue>

    </attribute>

    <attribute>

    <name>searchDepth</name>

    <rtexprvalue>true</rtexprvalue>

    </attribute>

    <attribute>

    <name>buttonLookAndFeel</name>

    <rtexprvalue>true</rtexprvalue>

    </attribute>

    </tag>

    </taglib>

    How to resolve the JSP parsing error which i am getting??

    Add a comment
    10|10000 characters needed characters exceeded

    • hi,

      is it the parsing for the htmlb.tld or for the spellcheck.tld who provide an error?

      are you developing iView with Eclipse and pdk?

      I think you do not change the web.xml, but the portalapp.xml

      your poartalap.xml must be something like this :

      <?xml version="1.0" encoding="utf-8"?>

      <application>

      <application-config>

      <property name="startup" value="true"/>

      <property name="SharingReference" value="htmlb"/>

      </application-config>

      <components>

      <component name="processForm">

      <component-config>

      <property name="ClassName" value="test.processForm"/>

      <property name="SecurityZone" value="test/high_safety"/>

      </component-config>

      <component-profile>

      <property name="htmlb" value="/SERVICE/htmlb/taglib/htmlb.tld"/>

      </component-profile>

      </component>

      </components>

      <services/>

      </application>

      Regards

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.