question: public WebappTemplateLoader ( ServletContext servletContext , String subdirPath ) { if ( servletContext == null ) { throw new IllegalArgumentException ( "servletContext == null" ) ; } if ( subdirPath == null ) { throw new IllegalArgumentException ( "path == null" ) ; } subdirPath = subdirPath . replace ( '\\' , '/' ) ; if ( ! subdirPath . endsWith ( "/" ) ) { subdirPath += "/" ; } if ( ! subdirPath . startsWith ( "/" ) ) { subdirPath = "/" + subdirPath ; } this . subdirPath = subdirPath ; this . servletContext = servletContext ; }
target:  Creates a template loader that will use the specified servlet context to load the resources. It will use the specified base path, which is interpreted relatively to the context root (does not mater if you start it with "/" or not). Path components should be separated by forward slashes independently of the separator character used by the underlying operating system.