• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Joe Ess
  • salvin francis

Problem accessing jsp page in a struts app

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am beginner in struts. I am using tomcat 5.0.19 and struts-1.1. I have successfully compiled, packaged and deployed a sample web application in tomcat. But when I try to access one of the jsp's which uses taglib's I get the following error:

org.apache.jasper.JasperException: Unable to initialize TldLocationsCache: null
org.apache.jasper.compiler.TldLocationsCache.init(TldLocationsCache.java:286)
org.apache.jasper.compiler.TldLocationsCache.getLocation(TldLocationsCache.java:257)
org.apache.jasper.JspCompilationContext.getTldLocation(JspCompilationContext.java:517)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:457)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:523)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1577)
org.apache.jasper.compiler.Parser.parse(Parser.java:171)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:258)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:139)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:237)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:553)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

I have ensured tht the taglib uri used in web.xml is the same that I used in the jsp. Pls help me out with this problem. Thanks in advance
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since the version of Tomcat you are using supports Servlet 2.3, all you need is the following in your jsp, and no entries in web.xml.

<%@ taglib uri="http://struts.apache.org/tags-xxxx" prefix="xxxx" %>

where xxxx is one of: bean, html, logic, nested ...
 
Can't .... do .... plaid .... So I did this tiny ad instead:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!