com.opensymphony.webwork.dispatcher
Class PlainTextResult

java.lang.Object
  extended by com.opensymphony.webwork.dispatcher.WebWorkResultSupport
      extended by com.opensymphony.webwork.dispatcher.PlainTextResult
All Implemented Interfaces:
WebWorkStatics, Result, Serializable

public class PlainTextResult
extends WebWorkResultSupport

A result that send the content out as plain text. Usefull typically when needed to display the raw content of a JSP or Html file for example.

 
 
 <action name="displayJspRawContent" >
   <result type="plaintext">/myJspFile.jsp</result>
 </action>
 
 
 <action name="displayJspRawContent" >
   <result type="plaintext">
      <param name="location">/myJspFile.jsp</param>
      <param name="charSet">UTF-8</param>
   </result>
 </action>
 
 
 

Version:
$Date: 2006-03-12 13:41:05 +0800 (Sun, 12 Mar 2006) $ $Id: PlainTextResult.java 2381 2006-03-12 05:41:05Z tmjee $
Author:
tm_jee
See Also:
Serialized Form

Field Summary
static int BUFFER_SIZE
           
 
Fields inherited from class com.opensymphony.webwork.dispatcher.WebWorkResultSupport
DEFAULT_PARAM, encode, location, parse
 
Fields inherited from interface com.opensymphony.webwork.WebWorkStatics
HTTP_REQUEST, HTTP_RESPONSE, PAGE_CONTEXT, SERVLET_CONTEXT, SERVLET_DISPATCHER
 
Constructor Summary
PlainTextResult()
           
 
Method Summary
protected  void doExecute(String finalLocation, ActionInvocation invocation)
          Executes the result given a final location (jsp page, action, etc) and the action invocation (the state in which the action was executed).
 String getCharSet()
           
 void setCharSet(String charSet)
           
 
Methods inherited from class com.opensymphony.webwork.dispatcher.WebWorkResultSupport
conditionalParse, execute, setEncode, setLocation, setParse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUFFER_SIZE

public static final int BUFFER_SIZE
See Also:
Constant Field Values
Constructor Detail

PlainTextResult

public PlainTextResult()
Method Detail

getCharSet

public String getCharSet()

setCharSet

public void setCharSet(String charSet)

doExecute

protected void doExecute(String finalLocation,
                         ActionInvocation invocation)
                  throws Exception
Description copied from class: WebWorkResultSupport
Executes the result given a final location (jsp page, action, etc) and the action invocation (the state in which the action was executed). Subclasses must implement this class to handle custom logic for result handling.

Specified by:
doExecute in class WebWorkResultSupport
Parameters:
finalLocation - the location (jsp page, action, etc) to go to.
invocation - the execution state of the action.
Throws:
Exception - if an error occurs while executing the result.

WebWork Project Page