Re: Returning text/html InputStream using Zero Configuration annotations

2008-10-07 Thread 928572663
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.opensymphon

Re: Returning text/html InputStream using Zero Configuration annotations

2008-10-07 Thread Laurie Harper
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. ---

Re: Returning text/html InputStream using Zero Configuration annotations

2008-10-07 Thread Lukasz Lenart
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" Regards -- Lukasz http://www.lenart.org.pl/ - To

Re: Returning text/html InputStream using Zero Configuration annotations

2008-10-07 Thread 928572663
Sorry I forgot to add this: If I change the value="" to value="John", the error message changes to this: ERROR dispatcher.StreamResult - Can not find a java.io.InputStream with the name [John] in the invocation stack. Check the name="inputName"> tag specified for this action. It appears t

Re: Returning text/html InputStream using Zero Configuration annotations

2008-10-07 Thread 928572663
Lukasz, Thank you for your reply. I tried adding the name="success" (or ActionSupport.SUCCESS) and I get the same error. Here is the annotation now: @Result(name="success", value = "", type = StreamResult.class, params = { "contentType", "text/html", "inputName", "inputStream"

Re: Returning text/html InputStream using Zero Configuration annotations

2008-10-06 Thread Lukasz Lenart
> @Result(value = "", type = StreamResult.class, params = You are missing Result Name, please specify it as a *success* http://struts.apache.org/2.0.11.2/docs/result-annotation.html Regards -- Lukasz http://www.lenart.org.pl/ ---

Returning text/html InputStream using Zero Configuration annotations

2008-10-06 Thread 928572663
I am trying to rewrite this sample code from the FAQ using zero configuration annoations: http://struts.apache.org/2.1.2/docs/how-can-we-return-a-text-string-as-the-response.html and I came up with this: import java.io.InputStream; import java.io.StringBufferInputStream; import org.apache.st