protected void addContext ( String pathSpec , String dir , boolean isFiltered ) throws IOException { if ( 0 == webServer . getHandlers ( ) . length ) { throw new RuntimeException ( "Couldn't find handler" ) ; } WebAppContext webAppCtx = new WebAppContext ( ) ; webAppCtx . setContextPath ( pathSpec ) ; webAppCtx . setWar ( dir ) ; addContext ( webAppCtx , true ) ; }
Add a context