• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Custom tags,tlds,jsp Error 500 Unable to load class null

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys.
I'm using Tomcat Version 1.1,I have copied example from JAVA professional
server programming hello tag example I have set all things and it doesnt work...
i'm getting error 500 ...
see below Error 500 and Error log from Jasper.log
Do have somobody idea what can be wrong?
Thank you
Igor
doc base in server.xml
******************************************************************
<Context path="/hello" docBase="E:\_Igor\JAVA_book_code\PJ2EE_edition\PSP_J2EE\hello"
defaultSessionTimeOut="30" isWARExpanded="true"
isWARValidated="false" isInvokerEnabled="true" isWorkDirPersistent="false" debug="0" reloadable="true" >
*******************************************************************
Directory of E:\_Igor\JAVA_book_code\PJ2EE_edition\PSP_J2EE\hello\WEB-INF
10/26/2003 03:04p <DIR> .
10/26/2003 03:04p <DIR> ..
10/27/2003 11:18a <DIR> classes
10/26/2003 04:09p <DIR> lib
10/26/2003 01:29p <DIR> src
10/27/2003 11:21a <DIR> tlds
09/23/2001 01:53p 542 web.xml
1 File(s) 542 bytes
6 Dir(s) 11,468,185,600 bytes free
********************************************************************
Directory of E:\_Igor\JAVA_book_code\PJ2EE_edition\PSP_J2EE\hello\WEB-INF\classes\tagext
10/26/2003 01:33p <DIR> .
10/26/2003 01:33p <DIR> ..
10/26/2003 01:33p 1,152 HelloTag.class
1 File(s) 1,152 bytes
2 Dir(s) 11,468,181,504 bytes free
*************************************************************************
tlds ....in hello.tld
<tag>
<name>hello</name>
<tag-class>tagext.HelloTag</tag-class>
<body-content>JSP</body-content>
<description>
Simple hello world example.
Takes no attributes, and simply generates HTML
</description>
</tag>
******************************************************************
web.xml
<!-- Tag Library Descriptor -->
<taglib>
<taglib-uri>/hello</taglib-uri>
<taglib-location>/WEB-INF/tlds/hello.tld</taglib-location>
</taglib>
************************************************************************

Error: 500
Location: /hello/hello.jsp
Internal Servlet Error:
org.apache.jasper.JasperException: Unable to load class null
at org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java:121)
at org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.init(JspParseEventListener.java:718)
at org.apache.jasper.compiler.JspParseEventListener.addGenerator(JspParseEventListener.java:132)
at org.apache.jasper.compiler.JspParseEventListener.handleTagBegin(JspParseEventListener.java:869)
at org.apache.jasper.compiler.DelegatingListener.handleTagBegin(DelegatingListener.java:194)
at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:822)
**************************************************************************
JAsper log
<JASPER_LOG> Mon Oct 27 11:23:12 EST 2003 Scratch dir for the JSP engine is: D:\jakarta-tomcat\work\localhost_8080%2Fadmin</JASPER_LOG>
<JASPER_LOG> Mon Oct 27 11:23:12 EST 2003 IMPORTANT: Do not modify the generated servlets</JASPER_LOG>
<JASPER_LOG> Mon Oct 27 11:25:46 EST 2003 JspEngine --> /hello.jsp</JASPER_LOG>
<JASPER_LOG> Mon Oct 27 11:25:46 EST 2003 ServletPath: /hello.jsp</JASPER_LOG>
<JASPER_LOG> Mon Oct 27 11:25:46 EST 2003 PathInfo: null</JASPER_LOG>
<JASPER_LOG> Mon Oct 27 11:25:46 EST 2003 RealPath: E:\_Igor\JAVA_book_code\PJ2EE_edition\PSP_J2EE\hello\hello.jsp</JASPER_LOG>
<JASPER_LOG> Mon Oct 27 11:25:46 EST 2003 RequestURI: /hello/hello.jsp</JASPER_LOG>
<JASPER_LOG> Mon Oct 27 11:25:46 EST 2003 QueryString: null</JASPER_LOG>
<JASPER_LOG> Mon Oct 27 11:25:46 EST 2003 Request Params: </JASPER_LOG>
<JASPER_LOG> Mon Oct 27 11:25:46 EST 2003 Classpath according to the Servlet Engine is: E:\_Igor\JAVA_book_code\PJ2EE_edition\PSP_J2EE\hello\WEB-INF\classes</JASPER_LOG>
<JASPER_LOG> Mon Oct 27 11:25:48 EST 2003 Warning: Unknown element tlib-version in TLD</JASPER_LOG>
<JASPER_LOG> Mon Oct 27 11:25:48 EST 2003 Warning: Unknown element jsp-version in TLD</JASPER_LOG>
<JASPER_LOG> Mon Oct 27 11:25:48 EST 2003 Warning: Unknown element short-name in TLD</JASPER_LOG>
<JASPER_LOG> Mon Oct 27 11:25:48 EST 2003 Warning: Unknown element description in TLD</JASPER_LOG>
<JASPER_LOG> Mon Oct 27 11:25:48 EST 2003 Warning: Unknown element listener in TLD</JASPER_LOG>
<JASPER_LOG> Mon Oct 27 11:25:48 EST 2003 Warning: Unknown element tag-class in tag</JASPER_LOG>
<JASPER_LOG> Mon Oct 27 11:25:48 EST 2003 Warning: Unknown element body-content in tag</JASPER_LOG>

 
Ranch Hand
Posts: 541
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the organisation of these definition files was changed a lot between tomcat versions. i would guess these example files are not for tomcat version 1. why are you using 1? tomcat 4 is great
 
Bruno Korcinski
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks TOM
I was just thinking to download new version of tomcat...:-)
because I have seen that something is wrong with Jasper log..if it canot recognise rigth tags warnings...
Anyway thanks a lot....
Igor
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic