• 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

Error Loading jsp file - Unable to initialize TldLocationsCache: null

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am getting this error when i am loading JSP file.

Error:
org.apache.jasper.JasperException: Unable to initialize TldLocationsCache: null
org.apache.jasper.compiler.TldLocationsCache.init(TldLocationsCache.java:249)
org.apache.jasper.compiler.TldLocationsCache.getLocation(TldLocationsCache.java:220)
org.apache.jasper.JspCompilationContext.getTldLocation(JspCompilationContext.java:475)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:417)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1539)
org.apache.jasper.compiler.Parser.parse(Parser.java:126)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:220)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:470)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)


JSP Program
-----------
<%@ page import="java.util.*" language="java" session="true" autoFlush="true" %>


<%@page contentType="text/html"%>

<!--
<%@ taglib uri="struts-logic.tld" prefix="logic" %>

<%@ taglib uri="struts-bean.tld" prefix="bean" %>

<%@ taglib uri="struts-html.tld" prefix="html" %>
-->





<HTML><!-- #BeginTemplate "/Templates/CBSTemplate.dwt" -->

<HEAD>

<!-- #BeginEditable "doctitle" -->


<meta http-equiv="Pragma" content="no-cache">

<meta http-equiv="Expires" content="Mon, 01 Jan 1990 12:00:00 GMT">

<meta http-equiv="Cache-control" content="no-cache">

<meta http-equiv="Cache-control" content="must-revalidate">

<meta http-equiv="Cache-control" content="max-age=0">




<LINK href="Style/Style.css" rel=stylesheet>

<STYLE type="text/css">

A.DDJ:link {

TEXT-DECORATION: none

}

A:hover{color:black}

A{text-decoration:none}

</STYLE>

</HEAD>
.
.
.
.
.
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Where are your .tld files located ..?? and could u plz post your taglib directive from the web.xml file.
 
chaity mk
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have solved that by commenting the tld tag related in web.xml and i am directly referring the tld location...as follows

<%@ taglib uri="/Tags/struts-logic.tld" prefix="logic" %>

<%@ taglib uri="/Tags/struts-bean.tld" prefix="bean" %>

<%@ taglib uri="/Tags/struts-html.tld" prefix="html" %>


i am also getting one more error as follows:
javax.servlet.ServletException: No collection found
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.NewsDetailsDDJ_jsp._jspService(NewsDetailsDDJ_jsp.java:257)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

i am trying the ws-struts example from IBM site....

<logic:iterate id="newsListID" name="newsForm" property="newsDetails" scope="request">

<p><b><font color='blue'>

<bean:write name="newsListID" property="newsContent"/>

</font>

</b>

</p>

</logic:iterate>

the above is the code snippet raising the error

please let me know the soln. thanx in advance
 
Liju Cherian
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi again,

Well, good to know u've resolved the first issue.
Now about the 2nd issue. In the logic:iterate tag you've specified a newsDetails collection of request scope. the error points out that such a collection is not available in the defined scope. Try checking the servlet and see if u've actually set the collection to request before forwarding to the jsp; or then again it could be a simple spelling mistake.

Hope this helps.

Liju
 
reply
    Bookmark Topic Watch Topic
  • New Topic