Package io.pebbletemplates.pebble.loader
Class Servlet5Loader
- java.lang.Object
-
- io.pebbletemplates.pebble.loader.AbstractServletLoader
-
- io.pebbletemplates.pebble.loader.Servlet5Loader
-
- All Implemented Interfaces:
Loader<java.lang.String>
public class Servlet5Loader extends AbstractServletLoader
Loader that uses a servlet context to find templates. Requires Jakarta Servlet 5.0 or newer.
-
-
Field Summary
Fields Modifier and Type Field Description private jakarta.servlet.ServletContext
context
-
Constructor Summary
Constructors Constructor Description Servlet5Loader(jakarta.servlet.ServletContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.net.URL
getResource(java.lang.String location)
protected java.io.InputStream
getResourceAsStream(java.lang.String location)
-
Methods inherited from class io.pebbletemplates.pebble.loader.AbstractServletLoader
createCacheKey, getCharset, getPrefix, getReader, getSuffix, resolveRelativePath, resourceExists, setCharset, setPrefix, setSuffix
-
-
-
-
Method Detail
-
getResourceAsStream
protected java.io.InputStream getResourceAsStream(java.lang.String location)
- Specified by:
getResourceAsStream
in classAbstractServletLoader
-
getResource
protected java.net.URL getResource(java.lang.String location) throws java.net.MalformedURLException
- Specified by:
getResource
in classAbstractServletLoader
- Throws:
java.net.MalformedURLException
-
-