org.apache.struts2.dispatcher
类 PlainTextResult

java.lang.Object
  继承者 org.apache.struts2.dispatcher.StrutsResultSupport
      继承者 org.apache.struts2.dispatcher.PlainTextResult
所有已实现的接口:
com.opensymphony.xwork2.Result, Serializable, StrutsStatics

public class PlainTextResult
extends StrutsResultSupport

A result that send the content out as plain text. Useful 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>

 
 

另请参见:
序列化表格

字段摘要
static int BUFFER_SIZE
           
 
从类 org.apache.struts2.dispatcher.StrutsResultSupport 继承的字段
DEFAULT_PARAM
 
从接口 org.apache.struts2.StrutsStatics 继承的字段
HTTP_REQUEST, HTTP_RESPONSE, PAGE_CONTEXT, SERVLET_CONTEXT, SERVLET_DISPATCHER, STRUTS_ACTION_TAG_INVOCATION, STRUTS_PORTLET_CONTEXT
 
构造方法摘要
PlainTextResult()
           
PlainTextResult(String location)
           
 
方法摘要
 String getCharSet()
          Set the character set
 void setCharSet(String charSet)
          Set the character set
 
从类 org.apache.struts2.dispatcher.StrutsResultSupport 继承的方法
execute, getLastFinalLocation, getLocation, setEncode, setLocation, setParse
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

BUFFER_SIZE

public static final int BUFFER_SIZE
另请参见:
常量字段值
构造方法详细信息

PlainTextResult

public PlainTextResult()

PlainTextResult

public PlainTextResult(String location)
方法详细信息

getCharSet

public String getCharSet()
Set the character set

返回:
The character set

setCharSet

public void setCharSet(String charSet)
Set the character set

参数:
charSet - The character set