on ‎2004 May 14 10:43 AM
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
Request clarification before answering.
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??
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
| User | Count |
|---|---|
| 5 | |
| 5 | |
| 4 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.