Jetty 9.2 Under Org.eclipse.jetty.NCSARequestLog, has been deleted, cannot find the item class, Web Access needs to be handled through ORG.ECLIPSE.JETTY.SERVER.ASYNCNCSAREQUESTLOG.
Modification Method:
To open the Jetty.home/etc/jetty.xml file, add the following content.
1) Add request processing Landlerrequestloghandler
<Item>
<new id= "Requestlog" class= "Org.eclipse.jetty.server.handler.RequestLogHandler"/>
</Item>
2) Add Create request processing instance configuration
<ref id= "Requestlog" >
<set name= "Requestlog" >
<new id= "Requestlog" class= "Org.eclipse.jetty.server.AsyncNCSARequestLog" >
<setname= "filename" ><property name= "Jetty.base" default= "/><property>".
<Name>jetty.requestlog.filePath</Name>
<Deprecated>requestlog.filename</Deprecated>
<default><propertyname= "Jetty.requestlog.dir" default= "/logs"/>/yyyy_mm_dd.request.log</default >
</Property>
</Set>
<setname= "Filenamedateformat" ><propertyname= "Jetty.requestlog.filenameDateFormat" deprecated= " Requestlog.filenamedateformat "default=" Yyyy_mm_dd "/></set>
<setname= "Retaindays" ><propertyname= "Jetty.requestlog.retainDays" deprecated= "Requestlog.retain" default= "/></set>"
<setname= "Append" ><propertyname= "Jetty.requestlog.append" deprecated= "Requestlog.append" default= "false "/></set>
<setname= "Extended" ><propertyname= "jetty.requestlog.extended" deprecated= "requestlog.extended" default= "False"/></set>
<setname= "Logcookies" ><propertyname= "jetty.requestlog.cookies" deprecated= "Requestlog.cookies" default= "False"/></set>
<setname= "Logtimezone" ><propertyname= "Jetty.requestlog.timezone" deprecated= "Requestlog.timezone" default= "GMT"/></set>
</New>
</Set>
</Ref>
code example:
<?xml version= "1.0"?>
<! DOCTYPE Configure Public "-//jetty//configure//en" "Http://www.eclipse.org/jetty/configure_9_0.dtd" >
<!--===============================================================--
<!--documentation of this file Formatcan is found at:-
<!--Http://wiki.eclipse.org/Jetty/Reference/jetty.xml_syntax--
<!---->
<!--Additional configuration files areavailable in $JETTY _home/etc-
<!--and can be mixed in. See Start.inifile for the default---
<!--configuration files. -
<!---->
<!--for a description of the configurationmechanism, see---
<!--output of:-
<!--Java-jar Start.jar-? -
<!--===============================================================--
<!--===============================================================--
<!--Configure a Jetty server instancewith an ID "server"--
<!--other configuration files may alsoconfigure the "Server"--
<!--ID, in which case they is addingconfiguration to the same-
<!--instance. If other configuration has a different id,they--
<!--'ll create and configure anotherinstance of Jetty. -
<!--Consult the Javadoc ofo.e.j.server.server for all--
<!--configuration that could be sethere. -
<!--===============================================================--
<configure id= "Server" class= "Org.eclipse.jetty.server.Server" >
<set name= "Handler" >
<new id= "Handlers" class= "Org.eclipse.jetty.server.handler.HandlerCollection" >
<set name= "Handlers" >
<array type= "Org.eclipse.jetty.server.Handler" >
<Item>
<new id= "Contexts" class= "org.eclipse.jetty.server.handler.ContextHandlerCollection"/>
</Item>
<Item>
<new id= "DefaultHandler" class= "Org.eclipse.jetty.server.handler.DefaultHandler"/>
</Item>
<Item>
<new id= "Requestlog" class= "Org.eclipse.jetty.server.handler.RequestLogHandler"/>
</Item>
</Array>
</Set>
</New>
</Set>
<ref id= "Requestlog" >
<set name= "Requestlog" >
<new id= "Requestlog" class= "Org.eclipse.jetty.server.AsyncNCSARequestLog" >
<setname= "filename" ><property name= "Jetty.base" default= "/><property>".
<Name>jetty.requestlog.filePath</Name>
<Deprecated>requestlog.filename</Deprecated>
<default><propertyname= "Jetty.requestlog.dir" default= "/logs"/>/yyyy_mm_dd.request.log</default >
</Property>
</Set>
<setname= "Filenamedateformat" ><propertyname= "Jetty.requestlog.filenameDateFormat" deprecated= " Requestlog.filenamedateformat "default=" Yyyy_mm_dd "/></set>
<setname= "Retaindays" ><propertyname= "Jetty.requestlog.retainDays" deprecated= "Requestlog.retain" default= "/></set>"
<setname= "Append" ><propertyname= "Jetty.requestlog.append" deprecated= "Requestlog.append" default= "false "/></set>
<setname= "Extended" ><propertyname= "jetty.requestlog.extended" deprecated= "requestlog.extended" default= "False"/></set>
<setname= "Logcookies" ><propertyname= "jetty.requestlog.cookies" deprecated= "Requestlog.cookies" default= "False"/></set>
<setname= "Logtimezone" ><propertyname= "Jetty.requestlog.timezone" deprecated= "Requestlog.timezone" default= "GMT"/></set>
</New>
</Set>
</Ref>
</Configure>