Jetty embedded and JSP compilation to 1.7?

坚强是说给别人听的谎言 提交于 2019-12-07 07:32:06

问题


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.

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.


回答1:


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

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

[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



来源:https://stackoverflow.com/questions/17152741/jetty-embedded-and-jsp-compilation-to-1-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!