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
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
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