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