Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem accessing jsp page in a struts app

 
chaganti bhaskar
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
 
Merrill Higginson
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 ...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic