org.springframework.extensions.surf.render.bean
Class JSPProcessor

java.lang.Object
  extended by org.springframework.extensions.surf.render.AbstractProcessor
      extended by org.springframework.extensions.surf.render.bean.JSPProcessor
All Implemented Interfaces:
EventListener, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener, Processor, org.springframework.web.context.ServletContextAware

public class JSPProcessor
extends AbstractProcessor
implements org.springframework.web.context.ServletContextAware

The JSP processor is a delegating processor in that it allows you to pass control of render processing to a specific JSP page. Thus, folks can dynamically add and remove JSP processors to their heart's content.

Author:
muzquiano

Field Summary
protected  javax.servlet.ServletContext servletContext
           
 
Constructor Summary
JSPProcessor()
           
 
Method Summary
protected  void doInclude(RenderContext context, String jspPath)
           
 void executeBody(ProcessorContext pc)
          Executes the "body" of the processor output using the given processor context.
 void executeHeader(ProcessorContext pc)
          Executes the "header" of the processor output using the given processor context.
 boolean exists(ProcessorContext pc)
          Indicates whether the engine responsible for processing the body of the processor exists.
 void setServletContext(javax.servlet.ServletContext servletContext)
           
 
Methods inherited from class org.springframework.extensions.surf.render.AbstractProcessor
execute, executeFooter, getProperty, getRenderingDescriptor, getRenderingDescriptor, init, onApplicationEvent, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

servletContext

protected javax.servlet.ServletContext servletContext
Constructor Detail

JSPProcessor

public JSPProcessor()
Method Detail

setServletContext

public void setServletContext(javax.servlet.ServletContext servletContext)
Specified by:
setServletContext in interface org.springframework.web.context.ServletContextAware

executeHeader

public void executeHeader(ProcessorContext pc)
                   throws RendererExecutionException
Description copied from interface: Processor
Executes the "header" of the processor output using the given processor context.

Specified by:
executeHeader in interface Processor
Overrides:
executeHeader in class AbstractProcessor
Parameters:
pc - processorContext
Throws:
RendererExecutionException

executeBody

public void executeBody(ProcessorContext pc)
                 throws RendererExecutionException
Description copied from interface: Processor
Executes the "body" of the processor output using the given processor context.

Specified by:
executeBody in interface Processor
Specified by:
executeBody in class AbstractProcessor
Parameters:
pc - processorContext
Throws:
RendererExecutionException

exists

public boolean exists(ProcessorContext pc)
Description copied from interface: Processor
Indicates whether the engine responsible for processing the body of the processor exists.

Specified by:
exists in interface Processor
Returns:

doInclude

protected void doInclude(RenderContext context,
                         String jspPath)
                  throws javax.servlet.ServletException,
                         IOException
Throws:
javax.servlet.ServletException
IOException


Copyright © 2009 SpringSource, Inc. All Rights Reserved.