au.com.whitesquare.waf.command.response
Class VelocityForwardResponse

java.lang.Object
  extended byau.com.whitesquare.waf.command.Response
      extended byau.com.whitesquare.waf.command.response.BaseForwardResponse
          extended byau.com.whitesquare.waf.command.response.VelocityForwardResponse
All Implemented Interfaces:
au.com.whitesquare.email.EmailContent

public class VelocityForwardResponse
extends BaseForwardResponse
implements au.com.whitesquare.email.EmailContent

This response will attempt to load the Velocity (vsl) file supplied by the url. It assumes that the Velocity application has been configured to know the relative root for the files.

Inside the VSL files themselves 3 main attributes are accessible:
waf_response This is the actual VelocityForwardResponse, so any methods or attributes that can be invoked on the Response or its subclass can be found by accessing the $waf_response object.

servlet_request This is the HttpServletRequest that invoked this response, any methods or attributes of the request can be accessed via the $servlet_reqeust object.

servlet_response This is the HttpServletResponse that invoked this response, any methods or attributes of the response can be accessed via the $servlet_response object.

All other parameters that are passed into the Response via the putData method will also be added to the velocity context, with their parameter name being their key used.


Last Modified $Date: 2005/08/18 01:01:51 $

Version:
$Revision: 1.4 $
Author:
Steve Mactaggart

Field Summary
 
Fields inherited from class au.com.whitesquare.waf.command.Response
servletContext
 
Constructor Summary
VelocityForwardResponse()
           
 
Method Summary
 String generateContent(String contentType)
           
 File[] getAttachments()
           
 void sendResponse(HttpServletRequest req, HttpServletResponse resp)
           
 
Methods inherited from class au.com.whitesquare.waf.command.response.BaseForwardResponse
getActualData, getData, getErrorCode, getFieldError, getMessage, getRequestValue, getUnreadErrors, getURL, hasFieldError, isErrorResponse, putData, setErrorCode, setErrorResponse, setErrors, setMessage, setParameters, setURL, toString
 
Methods inherited from class au.com.whitesquare.waf.command.Response
init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VelocityForwardResponse

public VelocityForwardResponse()
Method Detail

sendResponse

public void sendResponse(HttpServletRequest req,
                         HttpServletResponse resp)
                  throws Exception
Specified by:
sendResponse in class Response
Parameters:
req -
resp -
Throws:
Exception
See Also:
Response.sendResponse(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

generateContent

public String generateContent(String contentType)
Specified by:
generateContent in interface au.com.whitesquare.email.EmailContent
See Also:
EmailContent.generateContent(java.lang.String)

getAttachments

public File[] getAttachments()
Specified by:
getAttachments in interface au.com.whitesquare.email.EmailContent


Copyright © 2004 Whitesquare Software. All Rights Reserved.