public class PlainTextResult extends StrutsResultSupport
<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>
| Modifier and Type | Field and Description |
|---|---|
static int |
BUFFER_SIZE |
DEFAULT_PARAM, DEFAULT_URL_ENCODING, parseLocationHTTP_REQUEST, HTTP_RESPONSE, PAGE_CONTEXT, SERVLET_CONTEXT, SERVLET_DISPATCHER, STRUTS_ACTION_TAG_INVOCATION, STRUTS_PORTLET_CONTEXT| Constructor and Description |
|---|
PlainTextResult() |
PlainTextResult(String location) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
adjustLocation(String location) |
protected void |
applyAdditionalHeaders(javax.servlet.http.HttpServletResponse response) |
protected void |
applyCharset(Charset charset,
javax.servlet.http.HttpServletResponse response) |
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()
Set the character set
|
protected void |
logWrongStream(String finalLocation,
InputStream resourceAsStream) |
protected Charset |
readCharset() |
protected InputStream |
readStream(ActionInvocation invocation,
String location) |
protected void |
sendStream(PrintWriter writer,
InputStreamReader reader) |
void |
setCharSet(String charSet)
Set the character set
|
conditionalParse, conditionalParseCollection, execute, getLastFinalLocation, getLocation, setEncode, setLocation, setParsepublic static final int BUFFER_SIZE
public PlainTextResult()
public PlainTextResult(String location)
public String getCharSet()
public void setCharSet(String charSet)
charSet - The character setprotected void doExecute(String finalLocation, ActionInvocation invocation) throws Exception
StrutsResultSupportdoExecute in class StrutsResultSupportfinalLocation - the location (jsp page, action, etc) to go to.invocation - the execution state of the action.Exception - if an error occurs while executing the result.protected InputStream readStream(ActionInvocation invocation, String location)
protected void logWrongStream(String finalLocation, InputStream resourceAsStream)
protected void sendStream(PrintWriter writer, InputStreamReader reader) throws IOException
IOExceptionprotected void applyAdditionalHeaders(javax.servlet.http.HttpServletResponse response)
protected void applyCharset(Charset charset, javax.servlet.http.HttpServletResponse response)
protected Charset readCharset()
Copyright © 2000–2023 Apache Software Foundation. All rights reserved.