com.sun.jersey.server.impl.container.servlet
Class JSPTemplateProcessor

java.lang.Object
  extended by com.sun.jersey.server.impl.container.servlet.JSPTemplateProcessor
All Implemented Interfaces:
ViewProcessor<java.lang.String>

public class JSPTemplateProcessor
extends java.lang.Object
implements ViewProcessor<java.lang.String>

A JSP template processor.

Author:
Paul.Sandoz@Sun.Com

Constructor Summary
JSPTemplateProcessor(ResourceConfig resourceConfig)
           
 
Method Summary
 java.lang.String resolve(java.lang.String path)
          Resolve a template name to a template reference.
 void writeTo(java.lang.String resolvedPath, Viewable viewable, java.io.OutputStream out)
          Process a template and write the result to an output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSPTemplateProcessor

public JSPTemplateProcessor(@Context
                            ResourceConfig resourceConfig)
Method Detail

resolve

public java.lang.String resolve(java.lang.String path)
Description copied from interface: ViewProcessor
Resolve a template name to a template reference.

Specified by:
resolve in interface ViewProcessor<java.lang.String>
Parameters:
path - the template name
Returns:
the template reference, otherwise null if the template name cannot be resolved.

writeTo

public void writeTo(java.lang.String resolvedPath,
                    Viewable viewable,
                    java.io.OutputStream out)
             throws java.io.IOException
Description copied from interface: ViewProcessor
Process a template and write the result to an output stream.

Specified by:
writeTo in interface ViewProcessor<java.lang.String>
Parameters:
resolvedPath - the template reference. This is obtained by calling the ViewProcessor.resolve(java.lang.String) method with a template name.
viewable - the viewable that contains the model to be passed to the template.
out - the output stream to write the result of processing the template.
Throws:
java.io.IOException - if there was an error processing the template.


Copyright © 2011 Sun Microsystems, Inc. All Rights Reserved.