aspose file tools*
The moose likes Struts and the fly likes Problem accessing jsp page in a struts app Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem accessing jsp page in a struts app" Watch "Problem accessing jsp page in a struts app" New topic
Author

Problem accessing jsp page in a struts app

chaganti bhaskar
Greenhorn

Joined: Jul 05, 2005
Posts: 1
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

Joined: Feb 15, 2005
Posts: 4864
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 ...


Merrill
Consultant, Sima Solutions
 
 
subject: Problem accessing jsp page in a struts app