- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我的 Gradle 和 Maven 构建似乎将预编译的 JSP 放在不同的包中。 Maven 构建在 WEB-INF/classes/jsp/WEB_002dINF
中,而 Gradle 构建在 WEB-INF/classes/org/apache/jsp/WEB_002dINF
中.都还好吗?
编译后的 JSP 是否会同时用于 Tomcat 和 Jetty,无论它们是如何构建的?
以下是我的构建脚本的相关部分:
专家:
<profile>
<id>precompileJsps</id>
<activation>
<property>
<name>precompileJsps</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-jspc-maven-plugin</artifactId>
<version>${version.mortbay.jetty}</version>
<executions>
<execution>
<id>jspc</id>
<goals>
<goal>jspc</goal>
</goals>
<configuration>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
Gradle :
jasper {
compilerSourceVM = "1.7"
compilerTargetVM = "1.7"
outputDir = file("${buildDir}/jasper")
}
task precompileJsps(type: Compile) {
if (System.properties['precompileJsps'] == "true") {
dependsOn tomcatJasper
} else {
enabled = false
}
group = 'build'
description = 'Translates and compiles JSPs'
classpath = configurations.tomcat + sourceSets.main.output + sourceSets.main.runtimeClasspath
sourceCompatibility = jasper.compilerSourceVM
targetCompatibility = jasper.compilerTargetVM
destinationDir = file("$buildDir/classes/main")
source = jasper.outputDir
dependencyCacheDir = file("${buildDir}/dependency-cache")
}
war.dependsOn precompileJsps
(这个问题是从 https://stackoverflow.com/questions/19906475/how-do-i-verify-that-precompiled-jsps-are-used-in-tomcat-and-jetty 移过来的)
最佳答案
没有。每个容器都有自己的 JSP 编译器、编译后的 JSP 内部使用的内部类,以及 JSP 和类文件之间的映射。
您不会得到不同的结果,因为一个构建使用 Maven 而另一个使用 Gradle。您会得到不同的结果,因为一个构建使用 Jetty 编译器而另一个构建使用 tomcat 编译器。
关于jsp - 预编译 JSP 的正确 WEB-INF 路径是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19907297/
python 3.7 在编写最大值的搜索代码时,我遇到了负无穷大的奇怪行为。 有人可以解释为什么这种行为吗? >>> inf = float('inf') >>> inf is inf True >>
我是 Julia 的新手 - Windows 上的 1.0.0 版。 documentation陈述如下 julia> Inf / Inf NaN 但是当我执行以下操作时,我得到了不同的结果 juli
我是 Julia 的新手 - Windows 上的 1.0.0 版。 documentation陈述如下 julia> Inf / Inf NaN 但是当我执行以下操作时,我得到了不同的结果 juli
我正在使用用 Objective-C 编写的第三个 CocoaPods 库来截取 UITextView 的屏幕截图。 iOS 8 没问题,但在我更改 iOS 9 和 Swift 2 的语法后,它会抛出
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 我们不允许提问寻求书籍、工具、软件库等的推荐。您可以编辑问题,以便用事实和引用来回答。 关闭 7 年前。
我已经从 Intellij 为 Spark+ scala 代码创建了 jar 并尝试在开发集群中运行该 jar,但最终出现以下错误: Exception in thread "main" java.l
我有一个包含如下标记的 jsp 文件: 在我的应用中,部署结构是: WEB-INF |-lib |-some.jar |-META-INF
我正在尝试在大型数据集 (5000x300) 上运行 randomForest。不幸的是,我收到如下错误消息: > RF df2 df2 character(0) > df2 df2 numer
我想返回 +INF 但我只返回“inf”: int main(void) { double dubb = HUGE_VAL; printf("%f \n", dubb); } 我是不是
我不明白为什么在以下两种情况下除以 0 会产生不同的结果。amort 是一个计算常量摊销计划的函数。我们现在唯一关心的是 A 的最后一个元素恰好为 0。 amort = @(r,M) ((1+r).^
在 C 中,在使用 IEEE-754 float 的实现中,当我比较两个为 NaN 的 float 时,它返回 0 或“false”。但是为什么两个都为 inf 的 float 相等呢? 这个程序打印
以下代码生成结果-inf。 fn main() { println!("{}", (-10. / 0.)); } 但是,当我尝试下面的代码时,它没有打印出 true,而是给我一个错误。 fn
Numpy 的 log 方法为 log(0) 提供 -inf。这个值是可比较的: >>> np.log(0) == np.log(0) True 现在在单元测试中以下工作正常: self.assert
在下一种情况下哪种方法更好: 我需要获取一些按分数排序的元素,我可以使用这两种方法: 1. zrange myZset 1 5 WITHSCORES 2. zrangebyscore myZset
我正在尝试解释 Web 应用程序的基础知识。我在 META-INF 和 WEB-INF 上遇到了这个问题。这些目录是如何获得这些名称的? 最佳答案 Jar 文件实际上是 ZIP 文件,带有额外的信息和
我正在使用修改后的kanderson-well beats委托版本来修改AVKit需要的请求。所有代码将在帖子的底部。修改请求、创建字幕播放列表并将它们添加到主播放列表中是很好的,因为它们在请求AVM
当您有符合 IEEE754 标准的浮点实现时,与 NaN 的任何比较都是 false,即使是 NaN == NaN,但是+inf == +inf 是 true,为什么? 从我的角度来看,说 +inf
R 中是否有一个函数可以确定值是否为 NA , NaN , Inf , -Inf ,否则不是一个格式良好的数字? 最佳答案 你要is.finite > is.finite(NA) [1] FALSE
我们有一个应用程序,我们正在使用 InstallShield LE(Visual Studio 2010 附带的那个)来管理应用程序的安装。 作为安装的一部分,我需要安装一个 INF 文件,以便应用程
我正在将应用程序移植到 tomcat,我怀疑以下类加载可能是个问题... 如果我在 WEB-INF/classes 中有一个类需要一个在 WEB-INF/lib 中的类,他们找不到它。 如果我在 WE
我是一名优秀的程序员,十分优秀!