@ -221,6 +221,7 @@ public class JettyEmbeddedServletContainerFactory extends
protected final void configureWebAppContext ( WebAppContext context ,
ServletContextInitializer . . . initializers ) {
Assert . notNull ( context , "Context must not be null" ) ;
context . setTempDirectory ( getTempDirectory ( ) ) ;
setExtendedListenerTypes ( context ) ;
if ( this . resourceLoader ! = null ) {
context . setClassLoader ( this . resourceLoader . getClassLoader ( ) ) ;
@ -246,6 +247,11 @@ public class JettyEmbeddedServletContainerFactory extends
postProcessWebAppContext ( context ) ;
}
private File getTempDirectory ( ) {
String temp = System . getProperty ( "java.io.tmpdir" ) ;
return ( temp = = null ? null : new File ( temp ) ) ;
}
private void setExtendedListenerTypes ( WebAppContext context ) {
try {
context . getServletContext ( ) . setExtendedListenerTypes ( true ) ;