Jetty嵌入和JSP编译到1.7? [英] Jetty embedded and JSP compilation to 1.7?

查看:246
本文介绍了Jetty嵌入和JSP编译到1.7?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以指定某种方式目标版本的vm的jsp编译? (我需要1.7,而不是1.5,这是默认情况下)。

我有一个 WebAppContext ,一些过滤器在代码中等等
webapp本身是一个爆炸战争..所以没有使用xml配置,因为它不需要。

Could i specify somehow the target version of vm for jsp compilation? (I need 1.7, not 1.5 which is by default).
I have a WebAppContext, some filters in code on it etc. The webapp itself is an exploded war.. so no xml configuration is used as it was not needed.

但是似乎,xml配置是必要的,为了这样做?看起来像(而不会与代码中的定义冲突)?

..or有没有办法通过代码的技巧?
谢谢。

But seems, xml configuration are strictly necessary in order to do this?
How it shall look like (and wouldn't it conflict with the in-code definitions) ?
..or is there any way to do the trick through the code? Thanks.

推荐答案

http://www.eclipse.org/jetty/documentation/current/configuring-jsp.html#jsp-support

当你配置org.apache.jasper.JspServlet时,compilerTargetVM有一个选项让你设置这个值。

When you are configuring the org.apache.jasper.JspServlet, there is an option for compilerTargetVM which lets you set this value.

我要补充一点,你可能想要在jetty中查看webdefault.xml文件,并将JspServlet定义偷窥到你自己的web.xml中,

[edit] I'll add that you may want to look into the webdefault.xml file in jetty and poach the JspServlet definition there into your own web.xml and make your changes accordingly.

http://www.eclipse.org/jetty/documentation/current/webdefault-xml.html

这篇关于Jetty嵌入和JSP编译到1.7?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆