English 中文(简体)
文件 "/WEB- INF/ displaytatag. tld" 未找到例外
原标题:File "/WEB-INF/displaytag.tld" not found exception
  • 时间:2012-05-23 13:33:15
  •  标签:
  • jsp

我在尝试jstl 代码。 这是来自 Web. xml 的代码 。

<jsp-config>
<taglib>
    <taglib-uri >http://displaytag.sf.net</taglib-uri>
    <taglib-location>WEB-INF/displaytag.tld</taglib-location> 
</taglib>
</jsp-config>

在我的jsp档案中,我写道:

<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>

我对jstl一无所知。 我在网络上搜索 jstl 示例时得到了这个代码。 正如这个代码在网络上的注释所显示的, 这个代码正在起作用。 但我正在得到以下的例外 :

org.apache.jasper.JasperException: File "/WEB-INF/displaytag.tld" not found

整个堆栈跟踪 :

org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
    org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
    org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
    org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:160)
    org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:424)
    org.apache.jasper.compiler.Parser.parseDirective(Parser.java:493)
    org.apache.jasper.compiler.Parser.parseElements(Parser.java:1557)
    org.apache.jasper.compiler.Parser.parse(Parser.java:127)
    org.apache.jasper.compiler.ParserController.doParse(ParserController.java:212)
    org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
    org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:156)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:296)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

我还包括了jstl.jar和标准.jar文件。这个代码有什么问题?

最佳回答

这与 JSTL 有关, 与 JSTL 无关 。 要了解 JSTL 的确切内容, 请检查 < a href=" https:// stackoverflow. com/tags/jstl/info > our JSTL wiki page 。

显示塔不是 JSTL 的一部分。 显示塔是一个完全独立的标签lib, 它需要 < a href=" http://www. displaytag.org/1.2/ download.html" rel= “ nofollown noreferr" > download < a href=" "http://displaytag. sf.net" rel=" nofollown noreferrer" > > > http://displaytag. sf. net . 同一网站还包含 < a href=" http://www. displaytag.org/1.2/stall.html" rel= “ nofolveadnation noreferr" > 安装指令

问题回答

暂无回答




相关问题
Convert typed-in Text to lowercase

I ve got an index.jsp with [snip] <% String name = request.getParameter("name"); String pass = request.getParameter("pass"); String globalname = "webeng"; String globalpass = "2009"; ...

session transfer issue from Tomcat to ASP.Net

I am using Tomcat to host JSP and using IIS 7.0 to host aspx (C# + .Net 3.5 + VSTS 2008), and I have some session transfer issue from JSP page to ASPX page. JSP page is in one domain and all other ...

Setting the default value in Struts2

I am setting the value(kind of default value) for a drop down select value from action class in a page(given below). When the page loads the value is beig displayed but the other elements of the ...

Evaluate dynamically constructed JSP at runtime

I have a requirement where in the JSP page itself is created by the user and stored in the database. When viewing results we need to render this JSP to the client, evaluating all tags inside this JSP. ...

How to Pack/Encrypt/Unpack/Decrypt a bunch of files in Java?

I m essentially trying to do the following on a Java/JSP-driven web site: User supplies a password Password is used to build a strongly-encrypted archive file (zip, or anything else) containing a ...

JSP exception - class not found (tomcat)

I m setting up an existing application on a new Tomcat 5.5 server connecting to a Postgres database (running on Debian Lenny). When I access it I get a series of stack traces with the following root ...

ArrayList to Table in JSP

I have an ArrayList and i am trying to display it in a table ..... ArrayList rows = .... ..... <table cellspacing="1" cellpadding="4" border="3"> <tr> <TH>...

热门标签