• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Use Weblogic to Run Custom JSP Tag -- Please Help!!!

 
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using the Weblogic 5.1.0 to try out the Tag Handler Class (Lisgings 14.10, 14.11, 14.12) in Marty Hall's book entitled "Core Servlets and JavaServer Pages".
After I typed: http://localhost:7001/HeadingExample.jsp
in IE browser window
I got error message:
Parsing of JSP file '/HeadingExample.jsp' failed: Could not parse deployment descriptor: org.xml.sax.SAXParseException:Could not parse taglib, starting at line 6.
probably occurred due to an error in /HeadExample.jsp line 16:
<%@ taglib uri="\Web-inf\csajsp-taglib.tld" prefix="csajsp" %>
I compiled HeadingTag.java and saved the compiled file in:
c:\weblogic\myserver\servletclasses\coreservlets\tags\HeadingTag.class
The library file csajsp-taglib.tld is in:
c:\weblogic\myserver\public_html\Web-inf\csajsp-taglib.tld
and the jsp file HeadingExample.jsp is in
c:\weblogic\myserver\public_html\HeadingExample.jsp
All three files are directly downloaded from the web www.coreservlets.com. Could anybody tell me what I did wrong and how to make this example work? Thanks a lot in advance.

IP: Logged
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This means there is some problem in your .tld file. If your .tld file is correct, you can see a java file being created.
Check your .tld file format from sun's format.
Here is the sample ".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">
<!-- a tag library descriptor -->
<taglib>
<!-- after this the default space is
"http://java.sun.com/j2ee/dtds/jsptaglibrary_1_2.dtd"
-->
<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<shortname>mytag</shortname>
<uri></uri>
<info>
A simple tab library for the examples
</info>
<tag>
<name>example</name>
<tagclass>com.test.ExampleTag</tagclass>
<info> Display JSP sources </info>
</tag>
</taglib>

Hope this helps!
 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by JiaPei Jen:
I am using the Weblogic 5.1.0 to try out the Tag Handler Class (Lisgings 14.10, 14.11, 14.12) in Marty Hall's book entitled "Core Servlets and JavaServer Pages".
After I typed: http://localhost:7001/HeadingExample.jsp
in IE browser window
I got error message:
Parsing of JSP file '/HeadingExample.jsp' failed: Could not parse deployment descriptor: org.xml.sax.SAXParseException:Could not parse taglib, starting at line 6.
probably occurred due to an error in /HeadExample.jsp line 16:
<%@ taglib uri="\Web-inf\csajsp-taglib.tld" prefix="csajsp" %>
I compiled HeadingTag.java and saved the compiled file in:
c:\weblogic\myserver\servletclasses\coreservlets\tags\HeadingTag.class
The library file csajsp-taglib.tld is in:
c:\weblogic\myserver\public_html\Web-inf\csajsp-taglib.tld
and the jsp file HeadingExample.jsp is in
c:\weblogic\myserver\public_html\HeadingExample.jsp
All three files are directly downloaded from the web www.coreservlets.com. Could anybody tell me what I did wrong and how to make this example work? Thanks a lot in advance.

IP: Logged



CAN ANY BODY tell me what is the right solution for this....!!!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic