Awesome it's working now! Thanks to you both for your help.
For posterity's sake, here is the working code:
import java.io.InputStream;
import java.io.StringBufferInputStream;
import org.apache.struts2.config.Result;
import org.apache.struts2.dispatcher.StreamResult;
import com.opensymphony.xwork2.ActionSupport;
@Result(name = ActionSupport.SUCCESS, value = "inputStream", type =
StreamResult.class, params =
{
"contentType",
"text/html",
"inputName",
"inputStream"
})
public class TextResult extends ActionSupport
{
private InputStream inputStream;
public InputStream getInputStream()
{
return inputStream;
}
public String execute() throws Exception
{
inputStream = new StringBufferInputStream(
"Hello World! This is a text string response from a Struts 2
Action.");
return SUCCESS;
}
}
Thanks,
John
Laurie Harper wrote:
Lukasz Lenart wrote:
2008/10/7 928572663 <[EMAIL PROTECTED]>:
Sorry I forgot to add this:
If I change the value="" to value="John", the error message changes to
this:
try value="inputName"
Based on the code in the original post, that should be value="inputStream".
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]