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