|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.jersey.server.mvc.internal.DefaultTemplateProcessor<String>
org.glassfish.jersey.servlet.mvc.internal.JspTemplateProcessor
public class JspTemplateProcessor
A JSP template processor able to process resources obtained through servlet context.
| Constructor Summary | |
|---|---|
JspTemplateProcessor(Configuration config)
Creates new template processor for JSP. |
|
| Method Summary | |
|---|---|
protected List<String> |
getExtensions()
Get a list of possible file extensions for this template processor. |
String |
resolve(String name,
MediaType mediaType)
Resolve a template name to a template reference. |
void |
writeTo(String templateReference,
Viewable viewable,
MediaType mediaType,
OutputStream out)
Process a template and write the result to an output stream. |
| Methods inherited from class org.glassfish.jersey.server.mvc.internal.DefaultTemplateProcessor |
|---|
getBasePath, getPossibleTemplateNames, getTemplateName, setBasePathFromProperty |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JspTemplateProcessor(@Context
Configuration config)
template processor for JSP.
config - configuration to obtain init param from.| Method Detail |
|---|
public String resolve(String name,
MediaType mediaType)
TemplateProcessor
name - the template name.mediaType - requested media type of the template.
null if the template name cannot be resolved.protected List<String> getExtensions()
DefaultTemplateProcessortemplate processor.
getExtensions in class DefaultTemplateProcessor<String>
public void writeTo(String templateReference,
Viewable viewable,
MediaType mediaType,
OutputStream out)
throws IOException
TemplateProcessor
templateReference - the template reference. This is obtained by calling the TemplateProcessor.resolve(String,
javax.ws.rs.core.MediaType) method with a template name and media type.viewable - the viewable that contains the model to be passed to the template.mediaType - media type the templateReference should be transformed into.out - the output stream to write the result of processing the template.
IOException - if there was an error processing the template.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||