【问题标题】:jasper.jar has no source attachment TagFileProcessor.class when using a JSP tagjasper.jar 在使用 JSP 标签时没有源附件 TagFileProcessor.class
【发布时间】:2014-05-06 08:45:34
【问题描述】:

在我的 JSP 页面中加载 JSP 标记时遇到问题。

我像这样包含标签库:

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags"%>

并像这样在页面中包含我的标签:

<tags:company-icons companyID="${company.id}" />

当我尝试访问带有此标记行的页面时,我得到以下信息:

The JAR file /Applications/apache-tomcat-7.0.53/lib/jasper.jar has no source attachment.
You can attach the source by clicking Attach Source below:

如果我附上 jasper.jar,我会得到以下信息:

The source attachment does not contain the source for the file TagFileProcessor.class.

我已经解压了 jasper.jar 文件,里面有一个 TagFileProcessor.class 文件,但没有 .java 应该没问题。

这几个月来一直运行良好,但突然停止工作,没有任何解释。有什么想法吗?

【问题讨论】:

    标签: java jsp jstl tomcat7 taglib


    【解决方案1】:

    原来我需要在标签顶部添加以下内容:

    <%@ tag language="java" pageEncoding="US-ASCII"%>
    

    而我有:

    <%@ tag language="java" pageEncoding="ISO-8859-1"%>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-11-23
      • 1970-01-01
      • 1970-01-01
      • 2011-04-02
      • 1970-01-01
      • 2015-09-12
      • 2016-01-03
      • 1970-01-01
      相关资源
      最近更新 更多