2014-07-02 59 views
1

我试图将Jetty从7.6切换到9.2。码头9“ - 模块”而不是“选项”

我阅读并理解“OPTION”将不再有效。所以我改变了我的命令从

java -jar start.jar --ini **OPTIONS**=server,jmx,resources,websocket,ext,plus,jsp,annotations /u/khandela/project/base//etc/config/cometd/cometd_jetty_config.xml 

start.jar --ini **--module**=server,jmx,resources,websocket,ext,plus,jsp,annotations /u/khandela/project/base//etc/config/cometd/cometd_jetty_config.xml 

但我得到以下警告:

警告:**无法继续,需要依赖失踪。警告:**根据配置,Jetty无法启动,因为缺少启用的模块依赖关系。 警告:**这可能是由于npn上类似于spdy的传递依赖性,其基于

如何解决?

回答

2

您看到的关于[jsp-impl/${jsp-impl}-jsp]的错误是因为当您请求启动Jetty时未定义默认的jsp实现。

Jetty 9.2.x有2 different core JSP engines available

  • apache - Apache的碧玉JSP引擎(新码头默认)
  • glassfish - Glassfish的碧玉JSP引擎(原始版本中使用的码头现在已经过时/越野车和过时。)

Jetty 9.2中的行为是强制用户决定他们想要使用哪个实现。 这是一个错误,只是混淆希望以自己的方式来启动码头用户(即:不使用start.ini${jetty.base}记录机制)

一个feature request was filed,和Jetty的9.2.1之后的下一个版本将采用默认值为此值。自动选择apache。与此同时,在等待Jetty 9.2.2(或9.3.0)时,添加一个定义要使用哪个jsp-impl的属性。

$ start.jar --module=server,jmx,resources,websocket,ext,plus,jsp,annotations 
    jsp-impl=apache 
    /u/khandela/project/base/etc/config/cometd/cometd_jetty_config.xml 

注:摆脱--ini作为不使用start.jar

0

我有类似的问题,在Netbeans的8.0启动码头9.2.1。创建后JettyServer Jetty开始,当我添加到实际的Jetty Base Locationin到start.inijsp-impl=apache子句。

有完整的清单start.ini

#=========================================================== 
# Jetty start.jar arguments 
# 
# The contents of this file, together with the *.ini 
# files found in start.d directory are used to build 
# the classpath and command line on a call to 
# java -jar start.jar [arg...] 
# 
# Use the following command to see more options 
# java -jar start.jar --help 
# 
# Each line in these files is prepended to the command line 
# as arguments and may be either: 
# + A property like: name=value 
# + A module to enable like: --module=jmx 
# + An XML configuration file like: etc/jetty-feature.xml 
# + A start.jar option like: --dry-run 
# 
# If --exec or --dry-run are used, then this file may also 
# contain lines with: 
# + A JVM option like: -Xmx2000m 
# + A System Property like: -Dcom.sun.management.jmxremote 
# 
# The --add-to-start=module option can be used to append 
# a configuration template for a module to start.ini 
# The --add-to-startd=module option can be used to create 
# a configuration template for a module in start.d/module.ini 
# For example configure and run with SPDY use 
# 
# java -jar start.jar --add-to-startd=spdy 
# $EDITOR start.d/spdy.ini 
# java -jar start.jar 
# 
#=========================================================== 


# 
# Initialize module server 
# 
#--module=server 
--module=server,websocket,jsp,ext,jmx,resources,plus,annotations,commandmanager 
# removes bug 
jsp-impl=apache 
## Server Threading Configuration 
# minimum number of threads 
threads.min=10 
# maximum number of threads 
threads.max=200 
# thread idle timeout in milliseconds 
threads.timeout=60000 
# What host to listen on (leave commented to listen on all interfaces) 
#jetty.host=myhost.com 
# Dump the state of the Jetty server, components, and webapps after startup 
jetty.dump.start=false 
# Dump the state of the Jetty server, before stop 
jetty.dump.stop=false 

# 
# Initialize module deploy 
# 
--module=deploy 

# 
# Initialize module websocket 
# 
#--module=websocket 

# 
# Initialize module jsp 
# 
#--module=jsp 
# JSP Configuration 
# To use an non-jdk compiler for JSP compilation uncomment next line 
# -Dorg.apache.jasper.compiler.disablejsr199=true 

# 
# Initialize module ext 
# 
#--module=ext 

# 
# Initialize module resources 
# 
#--module=resources 

#--module=commandmanager 

通过比较原始start.ini文件,你看到中科院的差异。