【问题标题】:JBOSS JSP precompile | out dated jsp errorJBOSS JSP 预编译 |过时的jsp错误
【发布时间】:2011-05-09 05:25:19
【问题描述】:

我正在尝试在我们的 WAR 中预编译 JSP。我的 ant 脚本分两部分执行此操作。首先它创建源代码,然后编译。

最初会创建一些源文件。此后,抛出以下错误:

  [jasper2] 2010-11-12 16:58:49,865 DEBUG [org.apache.jasper.JspC] [processFile] [Thread:main] - [Processing file: /categoryLanding/content/jeans_body.jsp]
  [jasper2] 2010-11-12 16:58:49,868 DEBUG [org.apache.jasper.JspC] [processFile] [Thread:main] - [/category/content/body.jsp is out dated, compiling...]

有什么想法可能导致 jsp 被视为过时的吗?

【问题讨论】:

    标签: jsp tomcat jboss


    【解决方案1】:

    您的 ant 脚本是否有任何机会没有触及 .jsp 文件的日期?

    来自http://www.docjar.com/html/api/org/apache/jasper/JspC.java.html

    // If compile is set, generate both .java and .class, if
    1174               // .jsp file is newer than .class file;
    1175               // Otherwise only generate .java, if .jsp file is newer than
    1176               // the .java file
    1177               if( clc.isOutDated(compile) ) {
    1178                   if (log.isDebugEnabled()) {
    1179                       log.debug(jspUri + " is out dated, compiling...");
    1180                   }
    1181   
    1182                   clc.compile(compile, true);
    1183               }
    

    【讨论】:

    • 嘿,我认为预编译按预期工作。我刚刚重新访问了问题并注意到我收到以下错误:java.lang.ExceptionInInitializerError 需要确定根本原因。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-03-25
    相关资源
    最近更新 更多