cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

web.xml error

martine_bombardelli
Participant
0 Likes
784

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

View Entire Topic
Former Member
0 Likes

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

martine_bombardelli
Participant
0 Likes

Hi Antonio,

If I understand, I must copy this :

<taglib>

<taglib-uri>

tagLib

</taglib-uri>

<taglib-location>

/WEB-INF/tlds/your_taglib.tld

</taglib-location>

</taglib>

in my web.xml, wich is located in the WEB-INF directory,

but I don't know what is the "my_taglib.tld" is it located on the server, if that, in witch directory, or in the PAR file?

Regards

Former Member
0 Likes

You must have a .tld file in a folder inside WEB-INF. You have to put the relative path (/WEB-INF/ ... /file.tld) in <taglib-location>

Find the .tld file that you are calling.

(really it could be in a .jar o .par file; in this case try to use the internal path)

Lucky!!

martine_bombardelli
Participant
0 Likes

lol

thank you anyway

I get you some news if I find it

Regards